21. 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.
A graphics pipeline 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;
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
flagsis reserved for future use. -
topologyis a VkPrimitiveTopology defining the primitive topology, as described below. -
primitiveRestartEnablecontrols 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 theindexTypeparameter ofvkCmdBindIndexBufferis equal toVK_INDEX_TYPE_UINT32, 0xFF whenindexTypeis equal toVK_INDEX_TYPE_UINT8_EXT, or 0xFFFF whenindexTypeis equal toVK_INDEX_TYPE_UINT16. Primitive restart is not allowed for “list” topologies, unless one of the featuresprimitiveTopologyPatchListRestart(forVK_PRIMITIVE_TOPOLOGY_PATCH_LIST) orprimitiveTopologyListRestart(for all other list topologies) is enabled.
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.
-
VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06252
IftopologyisVK_PRIMITIVE_TOPOLOGY_POINT_LIST,VK_PRIMITIVE_TOPOLOGY_LINE_LIST,VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCYorVK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, andprimitiveRestartEnableisVK_TRUE, theprimitiveTopologyListRestartfeature must be enabled -
VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06253
IftopologyisVK_PRIMITIVE_TOPOLOGY_PATCH_LIST, andprimitiveRestartEnableisVK_TRUE, theprimitiveTopologyPatchListRestartfeature must be enabled -
VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429
If thegeometryShaderfeature is not enabled,topologymust not be any ofVK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY,VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY,VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCYorVK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY -
VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430
If thetessellationShaderfeature is not enabled,topologymust not beVK_PRIMITIVE_TOPOLOGY_PATCH_LIST -
VUID-VkPipelineInputAssemblyStateCreateInfo-triangleFans-04452
If theVK_KHR_portability_subsetextension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::triangleFansisVK_FALSE,topologymust not beVK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN
-
VUID-VkPipelineInputAssemblyStateCreateInfo-sType-sType
sTypemust beVK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO -
VUID-VkPipelineInputAssemblyStateCreateInfo-pNext-pNext
pNextmust beNULL -
VUID-VkPipelineInputAssemblyStateCreateInfo-flags-zerobitmask
flagsmust be0 -
VUID-VkPipelineInputAssemblyStateCreateInfo-topology-parameter
topologymust 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);
or the equivalent command
// Provided by VK_EXT_extended_dynamic_state2
void vkCmdSetPrimitiveRestartEnableEXT(
VkCommandBuffer commandBuffer,
VkBool32 primitiveRestartEnable);
-
commandBufferis the command buffer into which the command will be recorded. -
primitiveRestartEnablecontrols whether a special vertex index value is treated as restarting the assembly of primitives. It behaves in the same way asVkPipelineInputAssemblyStateCreateInfo::primitiveRestartEnable
This command sets the primitive restart enable for subsequent drawing
commands 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.
-
VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdSetPrimitiveRestartEnable-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Both |
Graphics |
21.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_LISTspecifies a series of separate point primitives. -
VK_PRIMITIVE_TOPOLOGY_LINE_LISTspecifies a series of separate line primitives. -
VK_PRIMITIVE_TOPOLOGY_LINE_STRIPspecifies a series of connected line primitives with consecutive lines sharing a vertex. -
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LISTspecifies a series of separate triangle primitives. -
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIPspecifies a series of connected triangle primitives with consecutive triangles sharing an edge. -
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FANspecifies a series of connected triangle primitives with all triangles sharing a common vertex. If theVK_KHR_portability_subsetextension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::triangleFansisVK_FALSE, then triangle fans are not supported by the implementation, andVK_PRIMITIVE_TOPOLOGY_TRIANGLE_FANmust not be used. -
VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCYspecifies a series of separate line primitives with adjacency. -
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCYspecifies a series of connected line primitives with adjacency, with consecutive primitives sharing three vertices. -
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCYspecifies a series of separate triangle primitives with adjacency. -
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCYspecifies connected triangle primitives with adjacency, with consecutive triangles sharing an edge. -
VK_PRIMITIVE_TOPOLOGY_PATCH_LISTspecifies 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);
or the equivalent command
// Provided by VK_EXT_extended_dynamic_state
void vkCmdSetPrimitiveTopologyEXT(
VkCommandBuffer commandBuffer,
VkPrimitiveTopology primitiveTopology);
-
commandBufferis the command buffer into which the command will be recorded. -
primitiveTopologyspecifies the primitive topology to use for drawing.
This command sets the primitive topology for subsequent drawing commands
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.
-
VUID-vkCmdSetPrimitiveTopology-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdSetPrimitiveTopology-primitiveTopology-parameter
primitiveTopologymust be a valid VkPrimitiveTopology value -
VUID-vkCmdSetPrimitiveTopology-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdSetPrimitiveTopology-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Both |
Graphics |
21.1.1. Topology Class
The primitive topologies are grouped into the following topology classes:
| Topology Class | Primitive Topology |
|---|---|
Point |
|
Line |
|
Triangle |
|
Patch |
|
21.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.
21.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.
21.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.
21.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.
21.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. |
21.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 |
21.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.
21.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.
21.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.
21.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.
21.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.
21.2. 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:
-
Submission order determines the initial ordering
-
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. -
If a drawing command includes multiple instances, the order in which instances are executed, from lower numbered instances to higher.
-
The order in which primitives are specified by a drawing command:
-
For non-indexed draws, from vertices with a lower numbered
vertexIndexto a higher numberedvertexIndex. -
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.
-
Within this order implementations further sort primitives:
-
If tessellation shading is active, by an implementation-dependent order of new primitives generated by tessellation.
-
If geometry shading is active, by the order new primitives are generated by geometry shading.
-
If the polygon mode is not
VK_POLYGON_MODE_FILL, orVK_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.
21.3. 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
vertexIndexto 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 byvertexIndex, as well as binding vertex buffers containing those attributes to a command buffer). These commands are: -
Indexed drawing commands read index values from an index buffer and use this to compute the
vertexIndexvalue for the vertex shader. These commands are:
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);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer being bound. -
offsetis the starting offset in bytes withinbufferused in index buffer address calculations. -
indexTypeis a VkIndexType value specifying the size of the indices.
-
VUID-vkCmdBindIndexBuffer-offset-00431
offsetmust be less than the size ofbuffer -
VUID-vkCmdBindIndexBuffer-offset-00432
The sum ofoffsetand the address of the range ofVkDeviceMemoryobject that is backingbuffer, must be a multiple of the type indicated byindexType -
VUID-vkCmdBindIndexBuffer-buffer-00433
buffermust have been created with theVK_BUFFER_USAGE_INDEX_BUFFER_BITflag -
VUID-vkCmdBindIndexBuffer-buffer-00434
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdBindIndexBuffer-indexType-02507
indexTypemust not beVK_INDEX_TYPE_NONE_KHR -
VUID-vkCmdBindIndexBuffer-indexType-02765
IfindexTypeisVK_INDEX_TYPE_UINT8_EXT, theindexTypeUint8feature must be enabled
-
VUID-vkCmdBindIndexBuffer-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdBindIndexBuffer-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdBindIndexBuffer-indexType-parameter
indexTypemust be a valid VkIndexType value -
VUID-vkCmdBindIndexBuffer-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdBindIndexBuffer-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdBindIndexBuffer-commonparent
Both ofbuffer, andcommandBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Both |
Graphics |
Possible values of 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_KHR_acceleration_structure
VK_INDEX_TYPE_NONE_KHR = 1000165000,
// Provided by VK_EXT_index_type_uint8
VK_INDEX_TYPE_UINT8_EXT = 1000265000,
// Provided by VK_NV_ray_tracing
VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR,
} VkIndexType;
-
VK_INDEX_TYPE_UINT16specifies that indices are 16-bit unsigned integer values. -
VK_INDEX_TYPE_UINT32specifies that indices are 32-bit unsigned integer values. -
VK_INDEX_TYPE_NONE_KHRspecifies that no indices are provided. -
VK_INDEX_TYPE_UINT8_EXTspecifies 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);
-
commandBufferis the command buffer into which the command is recorded. -
vertexCountis the number of vertices to draw. -
instanceCountis the number of instances to draw. -
firstVertexis the index of the first vertex to draw. -
firstInstanceis 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.
-
VUID-vkCmdDraw-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDraw-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDraw-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDraw-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDraw-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDraw-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDraw-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDraw-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDraw-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDraw-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDraw-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDraw-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDraw-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDraw-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDraw-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDraw-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDraw-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDraw-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDraw-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDraw-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDraw-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDraw-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDraw-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDraw-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDraw-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDraw-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDraw-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDraw-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDraw-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDraw-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDraw-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDraw-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDraw-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDraw-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDraw-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDraw-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDraw-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDraw-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDraw-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDraw-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDraw-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDraw-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDraw-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDraw-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDraw-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDraw-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDraw-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDraw-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDraw-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDraw-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDraw-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDraw-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDraw-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDraw-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDraw-commandBuffer-02712
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, any resource written to by theVkPipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource -
VUID-vkCmdDraw-commandBuffer-02713
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, pipeline stages other than the framebuffer-space and compute stages in theVkPipelineobject 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 theVkPipelinebound to the pipeline bind point used by this command uses theRayQueryKHRcapability, thencommandBuffermust 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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDraw-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDraw-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDraw-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDraw-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV
-
VUID-vkCmdDraw-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDraw-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDraw-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDraw-renderpass
This command must only be called inside of a render pass instance
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
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);
-
commandBufferis the command buffer into which the command is recorded. -
indexCountis the number of vertices to draw. -
instanceCountis the number of instances to draw. -
firstIndexis the base index within the index buffer. -
vertexOffsetis the value added to the vertex index before indexing into the vertex buffer. -
firstInstanceis 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 vkCmdBindIndexBuffer::indexType parameter
with which the buffer was bound.
The first vertex index is at an offset of firstIndex ×
indexSize + offset within the bound index buffer, where
offset is the offset specified by 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_EXT 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.
-
VUID-vkCmdDrawIndexed-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexed-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexed-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawIndexed-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndexed-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndexed-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexed-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexed-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawIndexed-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndexed-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndexed-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndexed-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndexed-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexed-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexed-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawIndexed-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndexed-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawIndexed-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawIndexed-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawIndexed-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawIndexed-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawIndexed-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawIndexed-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawIndexed-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawIndexed-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexed-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexed-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexed-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexed-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawIndexed-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawIndexed-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexed-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawIndexed-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawIndexed-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawIndexed-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexed-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexed-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexed-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexed-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexed-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexed-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexed-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexed-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawIndexed-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawIndexed-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawIndexed-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawIndexed-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawIndexed-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawIndexed-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexed-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawIndexed-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawIndexed-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndexed-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexed-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawIndexed-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawIndexed-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexed-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexed-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexed-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndexed-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexed-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawIndexed-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawIndexed-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDrawIndexed-commandBuffer-02712
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, any resource written to by theVkPipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource -
VUID-vkCmdDrawIndexed-commandBuffer-02713
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, pipeline stages other than the framebuffer-space and compute stages in theVkPipelineobject 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 theVkPipelinebound to the pipeline bind point used by this command uses theRayQueryKHRcapability, thencommandBuffermust 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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndexed-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexed-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawIndexed-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexed-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexed-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexed-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV -
VUID-vkCmdDrawIndexed-firstIndex-04932
(indexSize× (firstIndex+indexCount) +offset) must be less than or equal to the size of the bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viavkCmdBindIndexBuffer
-
VUID-vkCmdDrawIndexed-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawIndexed-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawIndexed-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawIndexed-renderpass
This command must only be called inside of a render pass instance
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
To record an ordered sequence of drawing operations 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);
-
commandBufferis the command buffer into which the command is recorded. -
drawCountis the number of draws to execute, and can be zero. -
pVertexInfois a pointer to an array of VkMultiDrawInfoEXT with vertex information to be drawn. -
instanceCountis the number of instances to draw. -
firstInstanceis the instance ID of the first instance to draw. -
strideis the byte stride between consecutive elements ofpVertexInfo.
drawCount draws are executed with parameters taken from
pVertexInfo.
The number of draw commands recorded is drawCount, with each command
reading, sequentially, a firstVertex and a vertexCount from
pVertexInfo.
-
VUID-vkCmdDrawMultiEXT-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMultiEXT-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMultiEXT-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawMultiEXT-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawMultiEXT-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawMultiEXT-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMultiEXT-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMultiEXT-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawMultiEXT-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMultiEXT-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMultiEXT-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMultiEXT-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMultiEXT-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawMultiEXT-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawMultiEXT-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawMultiEXT-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawMultiEXT-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawMultiEXT-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawMultiEXT-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawMultiEXT-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawMultiEXT-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawMultiEXT-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawMultiEXT-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawMultiEXT-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawMultiEXT-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMultiEXT-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMultiEXT-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMultiEXT-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMultiEXT-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawMultiEXT-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawMultiEXT-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiEXT-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawMultiEXT-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawMultiEXT-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawMultiEXT-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiEXT-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiEXT-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiEXT-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiEXT-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiEXT-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiEXT-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiEXT-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiEXT-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawMultiEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawMultiEXT-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawMultiEXT-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawMultiEXT-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMultiEXT-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawMultiEXT-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawMultiEXT-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMultiEXT-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMultiEXT-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawMultiEXT-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawMultiEXT-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMultiEXT-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMultiEXT-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMultiEXT-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMultiEXT-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawMultiEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawMultiEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDrawMultiEXT-commandBuffer-02712
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, any resource written to by theVkPipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource -
VUID-vkCmdDrawMultiEXT-commandBuffer-02713
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, pipeline stages other than the framebuffer-space and compute stages in theVkPipelineobject 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 theVkPipelinebound to the pipeline bind point used by this command uses theRayQueryKHRcapability, thencommandBuffermust 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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawMultiEXT-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawMultiEXT-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawMultiEXT-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawMultiEXT-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiEXT-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiEXT-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV -
VUID-vkCmdDrawMultiEXT-None-04933
ThemultiDrawfeature must be enabled -
VUID-vkCmdDrawMultiEXT-drawCount-04934
drawCountmust be less thanVkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount -
VUID-vkCmdDrawMultiEXT-drawCount-04935
IfdrawCountis greater than zero,pVertexInfomust be a valid pointer to memory containing one or more valid instances of VkMultiDrawInfoEXT structures -
VUID-vkCmdDrawMultiEXT-stride-04936
stridemust be a multiple of 4
-
VUID-vkCmdDrawMultiEXT-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawMultiEXT-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawMultiEXT-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawMultiEXT-renderpass
This command must only be called inside of a render pass instance
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
To record an ordered sequence of indexed drawing operations 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);
-
commandBufferis the command buffer into which the command is recorded. -
drawCountis the number of draws to execute, and can be zero. -
pIndexInfois a pointer to an array of VkMultiDrawIndexedInfoEXT with index information to be drawn. -
instanceCountis the number of instances to draw. -
firstInstanceis the instance ID of the first instance to draw. -
strideis the byte stride between consecutive elements ofpIndexInfo. -
pVertexOffsetisNULLor a pointer to the value added to the vertex index before indexing into the vertex buffer. When specified,VkMultiDrawIndexedInfoEXT::offsetis ignored.
drawCount indexed draws are executed with parameters taken from
pIndexInfo.
The number of draw commands recorded is drawCount, with each command
reading, sequentially, a firstIndex and an indexCount from
pIndexInfo.
If pVertexOffset is NULL, a vertexOffset is also read from
pIndexInfo, otherwise the value from dereferencing pVertexOffset
is used.
-
VUID-vkCmdDrawMultiIndexedEXT-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMultiIndexedEXT-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMultiIndexedEXT-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawMultiIndexedEXT-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawMultiIndexedEXT-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawMultiIndexedEXT-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMultiIndexedEXT-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMultiIndexedEXT-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMultiIndexedEXT-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMultiIndexedEXT-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMultiIndexedEXT-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMultiIndexedEXT-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawMultiIndexedEXT-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawMultiIndexedEXT-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawMultiIndexedEXT-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawMultiIndexedEXT-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawMultiIndexedEXT-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawMultiIndexedEXT-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawMultiIndexedEXT-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawMultiIndexedEXT-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawMultiIndexedEXT-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawMultiIndexedEXT-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawMultiIndexedEXT-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMultiIndexedEXT-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMultiIndexedEXT-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMultiIndexedEXT-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMultiIndexedEXT-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawMultiIndexedEXT-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawMultiIndexedEXT-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawMultiIndexedEXT-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawMultiIndexedEXT-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiIndexedEXT-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiIndexedEXT-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiIndexedEXT-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMultiIndexedEXT-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiIndexedEXT-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiIndexedEXT-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawMultiIndexedEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawMultiIndexedEXT-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawMultiIndexedEXT-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawMultiIndexedEXT-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMultiIndexedEXT-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawMultiIndexedEXT-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMultiIndexedEXT-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawMultiIndexedEXT-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMultiIndexedEXT-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMultiIndexedEXT-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMultiIndexedEXT-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMultiIndexedEXT-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawMultiIndexedEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawMultiIndexedEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02712
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, any resource written to by theVkPipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource -
VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02713
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported, pipeline stages other than the framebuffer-space and compute stages in theVkPipelineobject 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 theVkPipelinebound to the pipeline bind point used by this command uses theRayQueryKHRcapability, thencommandBuffermust 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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawMultiIndexedEXT-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawMultiIndexedEXT-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawMultiIndexedEXT-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawMultiIndexedEXT-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiIndexedEXT-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMultiIndexedEXT-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV -
VUID-vkCmdDrawMultiIndexedEXT-None-04937
ThemultiDrawfeature must be enabled -
VUID-vkCmdDrawMultiIndexedEXT-firstIndex-04938
(indexSize× (firstIndex+indexCount) +offset) must be less than or equal to the size of the bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viavkCmdBindIndexBuffer -
VUID-vkCmdDrawMultiIndexedEXT-drawCount-04939
drawCountmust be less thanVkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount -
VUID-vkCmdDrawMultiIndexedEXT-drawCount-04940
IfdrawCountis greater than zero,pIndexInfomust be a valid pointer to memory containing one or more valid instances of VkMultiDrawIndexedInfoEXT structures -
VUID-vkCmdDrawMultiIndexedEXT-stride-04941
stridemust be a multiple of 4
-
VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawMultiIndexedEXT-pVertexOffset-parameter
IfpVertexOffsetis notNULL,pVertexOffsetmust be a valid pointer to a validint32_tvalue -
VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawMultiIndexedEXT-renderpass
This command must only be called inside of a render pass instance
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
The VkMultiDrawInfoEXT structure is defined as:
// Provided by VK_EXT_multi_draw
typedef struct VkMultiDrawInfoEXT {
uint32_t firstVertex;
uint32_t vertexCount;
} VkMultiDrawInfoEXT;
-
firstVertexis the first vertex to draw. -
vertexCountis 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;
-
firstIndexis the first index to draw. -
indexCountis the number of vertices to draw. -
vertexOffsetis 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.
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);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer containing draw parameters. -
offsetis the byte offset intobufferwhere parameters begin. -
drawCountis the number of draws to execute, and can be zero. -
strideis 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.
-
VUID-vkCmdDrawIndirect-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndirect-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndirect-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawIndirect-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndirect-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndirect-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndirect-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndirect-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawIndirect-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndirect-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndirect-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndirect-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndirect-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndirect-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndirect-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawIndirect-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndirect-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawIndirect-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawIndirect-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawIndirect-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawIndirect-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawIndirect-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawIndirect-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawIndirect-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawIndirect-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndirect-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndirect-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndirect-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndirect-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawIndirect-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawIndirect-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirect-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawIndirect-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawIndirect-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawIndirect-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirect-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirect-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirect-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirect-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirect-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirect-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirect-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirect-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawIndirect-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawIndirect-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawIndirect-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawIndirect-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawIndirect-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirect-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawIndirect-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawIndirect-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndirect-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirect-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawIndirect-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawIndirect-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirect-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirect-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirect-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndirect-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirect-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawIndirect-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawIndirect-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndirect-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndirect-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawIndirect-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndirect-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirect-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirect-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV
-
VUID-vkCmdDrawIndirect-buffer-02708
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndirect-buffer-02709
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndirect-offset-02710
offsetmust be a multiple of4 -
VUID-vkCmdDrawIndirect-commandBuffer-02711
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawIndirect-drawCount-02718
If themultiDrawIndirectfeature is not enabled,drawCountmust be0or1 -
VUID-vkCmdDrawIndirect-drawCount-02719
drawCountmust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount -
VUID-vkCmdDrawIndirect-firstInstance-00478
If thedrawIndirectFirstInstancefeature is not enabled, all thefirstInstancemembers of theVkDrawIndirectCommandstructures accessed by this command must be0 -
VUID-vkCmdDrawIndirect-drawCount-00476
IfdrawCountis greater than1,stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawIndirectCommand) -
VUID-vkCmdDrawIndirect-drawCount-00487
IfdrawCountis equal to1, (offset+sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawIndirect-drawCount-00488
IfdrawCountis greater than1, (stride× (drawCount- 1) +offset+sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer
-
VUID-vkCmdDrawIndirect-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawIndirect-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndirect-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawIndirect-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawIndirect-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawIndirect-commonparent
Both ofbuffer, andcommandBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
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;
-
vertexCountis the number of vertices to draw. -
instanceCountis the number of instances to draw. -
firstVertexis the index of the first vertex to draw. -
firstInstanceis the instance ID of the first instance to draw.
The members of VkDrawIndirectCommand have the same meaning as the
similarly named parameters of vkCmdDraw.
-
VUID-VkDrawIndirectCommand-None-00500
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-VkDrawIndirectCommand-firstInstance-00501
If thedrawIndirectFirstInstancefeature is not enabled,firstInstancemust be0
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);
or the equivalent command
// Provided by VK_KHR_draw_indirect_count
void vkCmdDrawIndirectCountKHR(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
uint32_t stride);
or the equivalent command
// Provided by VK_AMD_draw_indirect_count
void vkCmdDrawIndirectCountAMD(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
uint32_t stride);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer containing draw parameters. -
offsetis the byte offset intobufferwhere parameters begin. -
countBufferis the buffer containing the draw count. -
countBufferOffsetis the byte offset intocountBufferwhere the draw count begins. -
maxDrawCountspecifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified incountBufferandmaxDrawCount. -
strideis 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.
-
VUID-vkCmdDrawIndirectCount-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndirectCount-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndirectCount-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawIndirectCount-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndirectCount-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndirectCount-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndirectCount-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndirectCount-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawIndirectCount-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndirectCount-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndirectCount-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndirectCount-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndirectCount-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndirectCount-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndirectCount-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawIndirectCount-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndirectCount-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawIndirectCount-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawIndirectCount-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawIndirectCount-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawIndirectCount-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawIndirectCount-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawIndirectCount-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawIndirectCount-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawIndirectCount-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndirectCount-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndirectCount-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndirectCount-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndirectCount-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawIndirectCount-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawIndirectCount-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectCount-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawIndirectCount-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawIndirectCount-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawIndirectCount-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectCount-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectCount-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectCount-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectCount-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectCount-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectCount-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectCount-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectCount-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawIndirectCount-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawIndirectCount-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawIndirectCount-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectCount-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectCount-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawIndirectCount-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndirectCount-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirectCount-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawIndirectCount-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectCount-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirectCount-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectCount-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndirectCount-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirectCount-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawIndirectCount-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawIndirectCount-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndirectCount-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndirectCount-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawIndirectCount-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndirectCount-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectCount-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectCount-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV
-
VUID-vkCmdDrawIndirectCount-buffer-02708
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndirectCount-buffer-02709
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndirectCount-offset-02710
offsetmust be a multiple of4 -
VUID-vkCmdDrawIndirectCount-commandBuffer-02711
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawIndirectCount-countBuffer-02714
IfcountBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndirectCount-countBuffer-02715
countBuffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndirectCount-countBufferOffset-02716
countBufferOffsetmust be a multiple of4 -
VUID-vkCmdDrawIndirectCount-countBuffer-02717
The count stored incountBuffermust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount -
VUID-vkCmdDrawIndirectCount-countBufferOffset-04129
(countBufferOffset+sizeof(uint32_t)) must be less than or equal to the size ofcountBuffer -
VUID-vkCmdDrawIndirectCount-None-04445
IfdrawIndirectCountis not enabled this function must not be used -
VUID-vkCmdDrawIndirectCount-stride-03110
stridemust be a multiple of4and must be greater than or equal to sizeof(VkDrawIndirectCommand) -
VUID-vkCmdDrawIndirectCount-maxDrawCount-03111
IfmaxDrawCountis greater than or equal to1, (stride× (maxDrawCount- 1) +offset+ sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawIndirectCount-countBuffer-03121
If the count stored incountBufferis equal to1, (offset+ sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawIndirectCount-countBuffer-03122
If the count stored incountBufferis greater than1, (stride× (drawCount- 1) +offset+ sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer
-
VUID-vkCmdDrawIndirectCount-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawIndirectCount-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndirectCount-countBuffer-parameter
countBuffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndirectCount-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawIndirectCount-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawIndirectCount-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawIndirectCount-commonparent
Each ofbuffer,commandBuffer, andcountBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
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);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer containing draw parameters. -
offsetis the byte offset intobufferwhere parameters begin. -
drawCountis the number of draws to execute, and can be zero. -
strideis 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.
-
VUID-vkCmdDrawIndexedIndirect-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexedIndirect-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawIndexedIndirect-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndexedIndirect-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndexedIndirect-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirect-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawIndexedIndirect-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndexedIndirect-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndexedIndirect-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndexedIndirect-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndexedIndirect-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexedIndirect-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexedIndirect-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawIndexedIndirect-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndexedIndirect-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawIndexedIndirect-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawIndexedIndirect-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawIndexedIndirect-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawIndexedIndirect-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawIndexedIndirect-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawIndexedIndirect-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawIndexedIndirect-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawIndexedIndirect-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexedIndirect-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexedIndirect-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexedIndirect-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexedIndirect-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawIndexedIndirect-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawIndexedIndirect-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawIndexedIndirect-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawIndexedIndirect-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawIndexedIndirect-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirect-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirect-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirect-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirect-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirect-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirect-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawIndexedIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawIndexedIndirect-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawIndexedIndirect-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirect-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirect-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexedIndirect-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawIndexedIndirect-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexedIndirect-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirect-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndexedIndirect-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexedIndirect-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawIndexedIndirect-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawIndexedIndirect-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndexedIndirect-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexedIndirect-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawIndexedIndirect-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexedIndirect-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV
-
VUID-vkCmdDrawIndexedIndirect-buffer-02708
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndexedIndirect-buffer-02709
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndexedIndirect-offset-02710
offsetmust be a multiple of4 -
VUID-vkCmdDrawIndexedIndirect-commandBuffer-02711
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawIndexedIndirect-drawCount-02718
If themultiDrawIndirectfeature is not enabled,drawCountmust be0or1 -
VUID-vkCmdDrawIndexedIndirect-drawCount-02719
drawCountmust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount -
VUID-vkCmdDrawIndexedIndirect-drawCount-00528
IfdrawCountis greater than1,stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawIndexedIndirectCommand) -
VUID-vkCmdDrawIndexedIndirect-firstInstance-00530
If thedrawIndirectFirstInstancefeature is not enabled, all thefirstInstancemembers of theVkDrawIndexedIndirectCommandstructures accessed by this command must be0 -
VUID-vkCmdDrawIndexedIndirect-drawCount-00539
IfdrawCountis equal to1, (offset+sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawIndexedIndirect-drawCount-00540
IfdrawCountis greater than1, (stride× (drawCount- 1) +offset+sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer
-
VUID-vkCmdDrawIndexedIndirect-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawIndexedIndirect-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndexedIndirect-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawIndexedIndirect-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawIndexedIndirect-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawIndexedIndirect-commonparent
Both ofbuffer, andcommandBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
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;
-
indexCountis the number of vertices to draw. -
instanceCountis the number of instances to draw. -
firstIndexis the base index within the index buffer. -
vertexOffsetis the value added to the vertex index before indexing into the vertex buffer. -
firstInstanceis the instance ID of the first instance to draw.
The members of VkDrawIndexedIndirectCommand have the same meaning as
the similarly named parameters of vkCmdDrawIndexed.
-
VUID-VkDrawIndexedIndirectCommand-None-00552
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-VkDrawIndexedIndirectCommand-indexSize-00553
(indexSize× (firstIndex+indexCount) +offset) must be less than or equal to the size of the bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viavkCmdBindIndexBuffer -
VUID-VkDrawIndexedIndirectCommand-firstInstance-00554
If thedrawIndirectFirstInstancefeature is not enabled,firstInstancemust be0
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);
or the equivalent command
// Provided by VK_KHR_draw_indirect_count
void vkCmdDrawIndexedIndirectCountKHR(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
uint32_t stride);
or the equivalent command
// Provided by VK_AMD_draw_indirect_count
void vkCmdDrawIndexedIndirectCountAMD(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
uint32_t stride);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer containing draw parameters. -
offsetis the byte offset intobufferwhere parameters begin. -
countBufferis the buffer containing the draw count. -
countBufferOffsetis the byte offset intocountBufferwhere the draw count begins. -
maxDrawCountspecifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified incountBufferandmaxDrawCount. -
strideis 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.
-
VUID-vkCmdDrawIndexedIndirectCount-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexedIndirectCount-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexedIndirectCount-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawIndexedIndirectCount-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndexedIndirectCount-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndexedIndirectCount-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirectCount-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirectCount-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndexedIndirectCount-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndexedIndirectCount-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndexedIndirectCount-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndexedIndirectCount-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexedIndirectCount-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawIndexedIndirectCount-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndexedIndirectCount-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawIndexedIndirectCount-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawIndexedIndirectCount-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawIndexedIndirectCount-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawIndexedIndirectCount-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawIndexedIndirectCount-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawIndexedIndirectCount-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawIndexedIndirectCount-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawIndexedIndirectCount-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexedIndirectCount-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexedIndirectCount-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexedIndirectCount-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexedIndirectCount-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawIndexedIndirectCount-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawIndexedIndirectCount-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawIndexedIndirectCount-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawIndexedIndirectCount-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirectCount-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirectCount-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirectCount-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndexedIndirectCount-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirectCount-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirectCount-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawIndexedIndirectCount-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawIndexedIndirectCount-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawIndexedIndirectCount-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirectCount-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirectCount-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexedIndirectCount-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawIndexedIndirectCount-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexedIndirectCount-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndexedIndirectCount-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndexedIndirectCount-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndexedIndirectCount-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawIndexedIndirectCount-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawIndexedIndirectCount-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndexedIndirectCount-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexedIndirectCount-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawIndexedIndirectCount-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexedIndirectCount-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirectCount-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirectCount-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV
-
VUID-vkCmdDrawIndexedIndirectCount-buffer-02708
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndexedIndirectCount-buffer-02709
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndexedIndirectCount-offset-02710
offsetmust be a multiple of4 -
VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-02711
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02714
IfcountBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02715
countBuffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndexedIndirectCount-countBufferOffset-02716
countBufferOffsetmust be a multiple of4 -
VUID-vkCmdDrawIndexedIndirectCount-countBuffer-02717
The count stored incountBuffermust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount -
VUID-vkCmdDrawIndexedIndirectCount-countBufferOffset-04129
(countBufferOffset+sizeof(uint32_t)) must be less than or equal to the size ofcountBuffer -
VUID-vkCmdDrawIndexedIndirectCount-None-04445
IfdrawIndirectCountis not enabled this function must not be used -
VUID-vkCmdDrawIndexedIndirectCount-stride-03142
stridemust be a multiple of4and must be greater than or equal to sizeof(VkDrawIndexedIndirectCommand) -
VUID-vkCmdDrawIndexedIndirectCount-maxDrawCount-03143
IfmaxDrawCountis greater than or equal to1, (stride× (maxDrawCount- 1) +offset+ sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawIndexedIndirectCount-countBuffer-03153
If count stored incountBufferis equal to1, (offset+ sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawIndexedIndirectCount-countBuffer-03154
If count stored incountBufferis greater than1, (stride× (drawCount- 1) +offset+ sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer
-
VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawIndexedIndirectCount-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndexedIndirectCount-countBuffer-parameter
countBuffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawIndexedIndirectCount-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawIndexedIndirectCount-commonparent
Each ofbuffer,commandBuffer, andcountBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
21.3.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 buffer and the passed in vertex stride parameter, call:
// 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);
-
commandBufferis the command buffer into which the command is recorded. -
instanceCountis the number of instances to draw. -
firstInstanceis the instance ID of the first instance to draw. -
counterBufferis the buffer handle from where the byte count is read. -
counterBufferOffsetis the offset into the buffer used to read the byte count, which is used to calculate the vertex count for this draw call. -
counterOffsetis subtracted from the byte count read from thecounterBufferat thecounterBufferOffset -
vertexStrideis 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 theXfbStride.
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.
-
VUID-vkCmdDrawIndirectByteCountEXT-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndirectByteCountEXT-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndirectByteCountEXT-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawIndirectByteCountEXT-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndirectByteCountEXT-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndirectByteCountEXT-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndirectByteCountEXT-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndirectByteCountEXT-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawIndirectByteCountEXT-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndirectByteCountEXT-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawIndirectByteCountEXT-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndirectByteCountEXT-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawIndirectByteCountEXT-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndirectByteCountEXT-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawIndirectByteCountEXT-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawIndirectByteCountEXT-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawIndirectByteCountEXT-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawIndirectByteCountEXT-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawIndirectByteCountEXT-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawIndirectByteCountEXT-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawIndirectByteCountEXT-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawIndirectByteCountEXT-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndirectByteCountEXT-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndirectByteCountEXT-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndirectByteCountEXT-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndirectByteCountEXT-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawIndirectByteCountEXT-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawIndirectByteCountEXT-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawIndirectByteCountEXT-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawIndirectByteCountEXT-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectByteCountEXT-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectByteCountEXT-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawIndirectByteCountEXT-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawIndirectByteCountEXT-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawIndirectByteCountEXT-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectByteCountEXT-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectByteCountEXT-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirectByteCountEXT-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawIndirectByteCountEXT-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirectByteCountEXT-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawIndirectByteCountEXT-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawIndirectByteCountEXT-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawIndirectByteCountEXT-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawIndirectByteCountEXT-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawIndirectByteCountEXT-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
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 thenullDescriptorfeature 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
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-primitiveTopology-03420
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled then vkCmdSetPrimitiveTopologyEXT must have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndirectByteCountEXT-None-04912
If the bound graphics pipeline was created with both theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTandVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndirectByteCountEXT-pStrides-04913
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2EXT must not beNULL -
VUID-vkCmdDrawIndirectByteCountEXT-None-04914
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdSetVertexInputEXT must have been called in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndirectByteCountEXT-None-04875
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled then vkCmdSetPatchControlPointsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectByteCountEXT-None-04879
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndirectByteCountEXT-stage-06481
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_TASK_BIT_NVorVK_SHADER_STAGE_MESH_BIT_NV -
VUID-vkCmdDrawIndirectByteCountEXT-transformFeedback-02287
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled -
VUID-vkCmdDrawIndirectByteCountEXT-transformFeedbackDraw-02288
The implementation must supportVkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackDraw -
VUID-vkCmdDrawIndirectByteCountEXT-vertexStride-02289
vertexStridemust be greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxTransformFeedbackBufferDataStride -
VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-04567
IfcounterBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-02290
counterBuffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawIndirectByteCountEXT-counterBufferOffset-04568
counterBufferOffsetmust be a multiple of4 -
VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02646
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-parameter
counterBuffermust be a valid VkBuffer handle -
VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawIndirectByteCountEXT-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawIndirectByteCountEXT-commonparent
Both ofcommandBuffer, andcounterBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
21.4. 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.
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:
// Provided by VK_EXT_conditional_rendering
void vkCmdBeginConditionalRenderingEXT(
VkCommandBuffer commandBuffer,
const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin);
-
commandBufferis the command buffer into which this command will be recorded. -
pConditionalRenderingBeginis a pointer to a VkConditionalRenderingBeginInfoEXT structure specifying parameters of conditional rendering.
-
VUID-vkCmdBeginConditionalRenderingEXT-None-01980
Conditional rendering must not already be active
-
VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdBeginConditionalRenderingEXT-pConditionalRenderingBegin-parameter
pConditionalRenderingBeginmust be a valid pointer to a valid VkConditionalRenderingBeginInfoEXT structure -
VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Both |
Graphics |
The VkConditionalRenderingBeginInfoEXT structure is defined as:
// Provided by VK_EXT_conditional_rendering
typedef struct VkConditionalRenderingBeginInfoEXT {
VkStructureType sType;
const void* pNext;
VkBuffer buffer;
VkDeviceSize offset;
VkConditionalRenderingFlagsEXT flags;
} VkConditionalRenderingBeginInfoEXT;
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
bufferis a buffer containing the predicate for conditional rendering. -
offsetis the byte offset intobufferwhere the predicate is located. -
flagsis 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.
-
VUID-VkConditionalRenderingBeginInfoEXT-buffer-01981
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkConditionalRenderingBeginInfoEXT-buffer-01982
buffermust have been created with theVK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXTbit set -
VUID-VkConditionalRenderingBeginInfoEXT-offset-01983
offsetmust be less than the size ofbufferby at least 32 bits -
VUID-VkConditionalRenderingBeginInfoEXT-offset-01984
offsetmust be a multiple of 4
-
VUID-VkConditionalRenderingBeginInfoEXT-sType-sType
sTypemust beVK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT -
VUID-VkConditionalRenderingBeginInfoEXT-pNext-pNext
pNextmust beNULL -
VUID-VkConditionalRenderingBeginInfoEXT-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-VkConditionalRenderingBeginInfoEXT-flags-parameter
flagsmust 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_EXTspecifies the condition used to determine whether to discard rendering commands or not. That is, if the 32-bit predicate read frombuffermemory atoffsetis 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);
-
commandBufferis the command buffer into which this command will be recorded.
Once ended, conditional rendering becomes inactive.
-
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
-
VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Both |
Graphics |
21.5. 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 draw that uses the mesh pipeline, call:
// Provided by VK_NV_mesh_shader
void vkCmdDrawMeshTasksNV(
VkCommandBuffer commandBuffer,
uint32_t taskCount,
uint32_t firstTask);
-
commandBufferis the command buffer into which the command will be recorded. -
taskCountis the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one. -
firstTaskis the X component of the first workgroup ID.
When the command is executed, a global workgroup consisting of
taskCount local workgroups is assembled.
-
VUID-vkCmdDrawMeshTasksNV-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMeshTasksNV-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMeshTasksNV-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawMeshTasksNV-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawMeshTasksNV-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawMeshTasksNV-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMeshTasksNV-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMeshTasksNV-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawMeshTasksNV-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMeshTasksNV-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMeshTasksNV-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMeshTasksNV-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMeshTasksNV-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawMeshTasksNV-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawMeshTasksNV-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawMeshTasksNV-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawMeshTasksNV-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawMeshTasksNV-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawMeshTasksNV-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawMeshTasksNV-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawMeshTasksNV-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawMeshTasksNV-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawMeshTasksNV-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawMeshTasksNV-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawMeshTasksNV-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMeshTasksNV-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMeshTasksNV-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMeshTasksNV-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMeshTasksNV-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawMeshTasksNV-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawMeshTasksNV-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksNV-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawMeshTasksNV-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawMeshTasksNV-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawMeshTasksNV-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksNV-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksNV-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksNV-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksNV-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksNV-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksNV-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksNV-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksNV-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawMeshTasksNV-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawMeshTasksNV-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawMeshTasksNV-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksNV-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksNV-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksNV-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawMeshTasksNV-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksNV-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksNV-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMeshTasksNV-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksNV-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawMeshTasksNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawMeshTasksNV-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDrawMeshTasksNV-stage-06480
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_VERTEX_BIT,VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,VK_SHADER_STAGE_TESSELLATION_EVALUATION_BITorVK_SHADER_STAGE_GEOMETRY_BIT -
VUID-vkCmdDrawMeshTasksNV-taskCount-02119
taskCountmust be less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV::maxDrawMeshTasksCount
-
VUID-vkCmdDrawMeshTasksNV-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawMeshTasksNV-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawMeshTasksNV-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawMeshTasksNV-renderpass
This command must only be called inside of a render pass instance
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
To record an indirect mesh tasks draw, call:
// Provided by VK_NV_mesh_shader
void vkCmdDrawMeshTasksIndirectNV(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
uint32_t drawCount,
uint32_t stride);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer containing draw parameters. -
offsetis the byte offset intobufferwhere parameters begin. -
drawCountis the number of draws to execute, and can be zero. -
strideis 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.
-
VUID-vkCmdDrawMeshTasksIndirectNV-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMeshTasksIndirectNV-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMeshTasksIndirectNV-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawMeshTasksIndirectNV-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMeshTasksIndirectNV-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMeshTasksIndirectNV-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMeshTasksIndirectNV-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMeshTasksIndirectNV-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawMeshTasksIndirectNV-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawMeshTasksIndirectNV-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawMeshTasksIndirectNV-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawMeshTasksIndirectNV-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawMeshTasksIndirectNV-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawMeshTasksIndirectNV-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMeshTasksIndirectNV-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMeshTasksIndirectNV-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMeshTasksIndirectNV-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawMeshTasksIndirectNV-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawMeshTasksIndirectNV-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawMeshTasksIndirectNV-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectNV-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksIndirectNV-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksIndirectNV-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawMeshTasksIndirectNV-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawMeshTasksIndirectNV-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectNV-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectNV-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawMeshTasksIndirectNV-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectNV-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectNV-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectNV-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectNV-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawMeshTasksIndirectNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawMeshTasksIndirectNV-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDrawMeshTasksIndirectNV-stage-06480
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_VERTEX_BIT,VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,VK_SHADER_STAGE_TESSELLATION_EVALUATION_BITorVK_SHADER_STAGE_GEOMETRY_BIT
-
VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02708
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02709
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawMeshTasksIndirectNV-offset-02710
offsetmust be a multiple of4 -
VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-02711
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02718
If themultiDrawIndirectfeature is not enabled,drawCountmust be0or1 -
VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02719
drawCountmust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount -
VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02146
IfdrawCountis greater than1,stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawMeshTasksIndirectCommandNV) -
VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02156
IfdrawCountis equal to1, (offset+sizeof(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02157
IfdrawCountis greater than1, (stride× (drawCount- 1) +offset+sizeof(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size ofbuffer
-
VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawMeshTasksIndirectNV-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawMeshTasksIndirectNV-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawMeshTasksIndirectNV-commonparent
Both ofbuffer, andcommandBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |
The VkDrawMeshTasksIndirectCommandNV structure is defined as:
// Provided by VK_NV_mesh_shader
typedef struct VkDrawMeshTasksIndirectCommandNV {
uint32_t taskCount;
uint32_t firstTask;
} VkDrawMeshTasksIndirectCommandNV;
-
taskCountis the number of local workgroups to dispatch in the X dimension. Y and Z dimension are implicitly set to one. -
firstTaskis the X component of the first workgroup ID.
The members of VkDrawMeshTasksIndirectCommandNV have the same meaning
as the similarly named parameters of vkCmdDrawMeshTasksNV.
To record an indirect mesh tasks draw with the draw count sourced from a buffer, call:
// Provided by VK_NV_mesh_shader
void vkCmdDrawMeshTasksIndirectCountNV(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkDeviceSize offset,
VkBuffer countBuffer,
VkDeviceSize countBufferOffset,
uint32_t maxDrawCount,
uint32_t stride);
-
commandBufferis the command buffer into which the command is recorded. -
bufferis the buffer containing draw parameters. -
offsetis the byte offset intobufferwhere parameters begin. -
countBufferis the buffer containing the draw count. -
countBufferOffsetis the byte offset intocountBufferwhere the draw count begins. -
maxDrawCountspecifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified incountBufferandmaxDrawCount. -
strideis 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.
-
VUID-vkCmdDrawMeshTasksIndirectCountNV-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toVK_FALSEis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must containVK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02691
If aVkImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02692
If aVkImageViewis sampled withVK_FILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubic-02694
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTas a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMeshTasksIndirectCountNV-filterCubicMinmax-02695
Any VkImageView being sampled withVK_FILTER_CUBIC_EXTwith a reduction mode of eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXas a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawMeshTasksIndirectCountNV-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontainingVK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using a VkSamplerAddressMode ofVK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-06423
Any VkImageView or VkBufferView being written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-OpTypeImage-06424
Any VkImageView or VkBufferView being read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02697
For each set n that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMeshTasksIndirectCountNV-maintenance4-06425
If themaintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02699
Descriptors in each bound descriptor set, specified viavkCmdBindDescriptorSets, must be valid if they are statically used by theVkPipelinebound to the pipeline bind point used by this command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02700
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02701
If theVkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02859
There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in theVkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02702
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02703
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02704
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage -
VUID-vkCmdDrawMeshTasksIndirectCountNV-uniformBuffers-06935
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and therobustBufferAccessfeature 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-storageBuffers-06936
If any stage of theVkPipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorVK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and therobustBufferAccessfeature 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-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resource -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06550
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions -
VUID-vkCmdDrawMeshTasksIndirectCountNV-ConstOffset-06551
If theVkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04115
If a VkImageView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format -
VUID-vkCmdDrawMeshTasksIndirectCountNV-OpImageWrite-04469
If a VkBufferView is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 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, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdDrawMeshTasksIndirectCountNV-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with theVK_IMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with theVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMeshTasksIndirectCountNV-subpass-02685
The subpass index of the current render pass must be equal to thesubpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02686
Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set -
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-06538
If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06539
If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment -
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 and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
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::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-06666
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled then vkCmdSetSampleLocationsEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03417
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline -
VUID-vkCmdDrawMeshTasksIndirectCountNV-scissorCount-03418
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline -
VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-03419
If the bound graphics pipeline state was created with both theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then both vkCmdSetViewportWithCount and vkCmdSetScissorWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04137
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04138
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportWScalingNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04139
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-viewportCount-04140
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportShadingRatePaletteNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-VkPipelineVieportCreateInfo-04141
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportSwizzleStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-VkPipelineVieportCreateInfo-04142
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and a VkPipelineViewportExclusiveScissorStateCreateInfoNV structure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created with VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04876
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled then vkCmdSetRasterizerDiscardEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04877
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled then vkCmdSetDepthBiasEnable must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDrawMeshTasksIndirectCountNV-logicOp-04878
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and thelogicOpmust be a valid VkLogicOp value -
VUID-vkCmdDrawMeshTasksIndirectCountNV-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be1 -
VUID-vkCmdDrawMeshTasksIndirectCountNV-blendEnable-04727
If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beVK_FALSE -
VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-04740
If rasterization is not disabled in the bound graphics pipeline, and neither theVK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, then VkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06172
If the current render pass instance was begun with vkCmdBeginRendering, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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, theimageViewmember ofpDepthAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpDepthAttachmentisVK_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, theimageViewmember ofpStencilAttachmentis not VK_NULL_HANDLE, and thelayoutmember ofpStencilAttachmentisVK_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 currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMaskequal to VkRenderingInfo::viewMask -
VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06179
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCountequal to VkRenderingInfo::colorAttachmentCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06180
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectCountNV-attachmentCount-06667
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be greater than or equal to theVkPipelineColorBlendStateCreateInfo::attachmentCountof the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectCountNV-attachmentCount-06815
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTdynamic state enabled then vkCmdSetColorWriteEnableEXT must have been called in the current command buffer prior to this drawing command, and theattachmentCountparameter ofvkCmdSetColorWriteEnableEXTmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits -
VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06181
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06182
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to the VkFormat used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06183
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR -
VUID-vkCmdDrawMeshTasksIndirectCountNV-imageView-06184
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas not VK_NULL_HANDLE, the currently bound graphics pipeline must have been created withVK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT -
VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06185
If the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06186
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently 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 currently bound pipeline was created with a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember of VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV used to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectCountNV-colorAttachmentCount-06188
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCountparameter greater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline -
VUID-vkCmdDrawMeshTasksIndirectCountNV-pDepthAttachment-06189
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pDepthAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pDepthAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectCountNV-pStencilAttachment-06190
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and VkRenderingInfo::pStencilAttachment->imageViewwas not VK_NULL_HANDLE, the value of VkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to create VkRenderingInfo::pStencilAttachment->imageView -
VUID-vkCmdDrawMeshTasksIndirectCountNV-renderPass-06198
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPassequal to VK_NULL_HANDLE -
VUID-vkCmdDrawMeshTasksIndirectCountNV-primitivesGeneratedQueryWithRasterizerDiscard-06708
If theprimitivesGeneratedQueryWithRasterizerDiscardfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, rasterization discard must not be enabled. -
VUID-vkCmdDrawMeshTasksIndirectCountNV-primitivesGeneratedQueryWithNonZeroStreams-06709
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, the bound graphics pipeline must not have been created with a non-zero value inVkPipelineRasterizationStateStreamCreateInfoEXT::rasterizationStream.
-
VUID-vkCmdDrawMeshTasksIndirectCountNV-stage-06480
The bound graphics pipeline must not have been created with the VkPipelineShaderStageCreateInfo::stagemember of an element of VkGraphicsPipelineCreateInfo::pStagesset toVK_SHADER_STAGE_VERTEX_BIT,VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,VK_SHADER_STAGE_TESSELLATION_EVALUATION_BITorVK_SHADER_STAGE_GEOMETRY_BIT
-
VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02708
Ifbufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02709
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawMeshTasksIndirectCountNV-offset-02710
offsetmust be a multiple of4 -
VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-02711
commandBuffermust not be a protected command buffer
-
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02714
IfcountBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02715
countBuffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBufferOffset-02716
countBufferOffsetmust be a multiple of4 -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02717
The count stored incountBuffermust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBufferOffset-04129
(countBufferOffset+sizeof(uint32_t)) must be less than or equal to the size ofcountBuffer -
VUID-vkCmdDrawMeshTasksIndirectCountNV-None-04445
IfdrawIndirectCountis not enabled this function must not be used -
VUID-vkCmdDrawMeshTasksIndirectCountNV-stride-02182
stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawMeshTasksIndirectCommandNV) -
VUID-vkCmdDrawMeshTasksIndirectCountNV-maxDrawCount-02183
IfmaxDrawCountis greater than or equal to1, (stride× (maxDrawCount- 1) +offset+sizeof(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02191
If the count stored incountBufferis equal to1, (offset+sizeof(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size ofbuffer -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02192
If the count stored incountBufferis greater than1, (stride× (drawCount- 1) +offset+sizeof(VkDrawMeshTasksIndirectCommandNV)) must be less than or equal to the size ofbuffer
-
VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-parameter
buffermust be a valid VkBuffer handle -
VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-parameter
countBuffermust be a valid VkBuffer handle -
VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations -
VUID-vkCmdDrawMeshTasksIndirectCountNV-renderpass
This command must only be called inside of a render pass instance -
VUID-vkCmdDrawMeshTasksIndirectCountNV-commonparent
Each ofbuffer,commandBuffer, andcountBuffermust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
Primary |
Inside |
Graphics |