C Specification
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);
Parameters
-
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.
Description
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 to VK_FILTER_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexedIndirect-magFilter-09598
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdDrawIndexedIndirect-mipmapMode-09599
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdDrawIndexedIndirect-unnormalizedCoordinates-09635
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’slevelCountandlayerCountmust be 1 -
VUID-vkCmdDrawIndexedIndirect-None-08609
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’sviewTypemust be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdDrawIndexedIndirect-None-08610
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name -
VUID-vkCmdDrawIndexedIndirect-None-08611
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values -
VUID-vkCmdDrawIndexedIndirect-aspectMask-06478
If a VkImageView is sampled with depth comparison, the image view must have been created with anaspectMaskthat contains VK_IMAGE_ASPECT_DEPTH_BIT -
VUID-vkCmdDrawIndexedIndirect-None-02691
If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndexedIndirect-None-07888
If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT -
VUID-vkCmdDrawIndexedIndirect-None-02692
If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdDrawIndexedIndirect-None-02693
If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY -
VUID-vkCmdDrawIndexedIndirect-filterCubic-02694
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02695
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirect-None-08600
If a a bound shader statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline , as described in [descriptorsets-compatibility] -
VUID-vkCmdDrawIndexedIndirect-None-08601
If a a bound shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline -
VUID-vkCmdDrawIndexedIndirect-None-10068
For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command -
VUID-vkCmdDrawIndexedIndirect-None-08114
Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by a bound shader -
VUID-vkCmdDrawIndexedIndirect-imageLayout-00344
If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules -
VUID-vkCmdDrawIndexedIndirect-None-08606
A valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdDrawIndexedIndirect-None-08608
There must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdDrawIndexedIndirect-uniformBuffers-06935
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and 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 the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, 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 bound shaders must not be a protected resource -
VUID-vkCmdDrawIndexedIndirect-viewType-07752
If a VkImageView is accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in [spirvenv-image-dimensions] -
VUID-vkCmdDrawIndexedIndirect-format-07753
If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’sformatand theSampledTypeoperand of theOpTypeImagemust match -
VUID-vkCmdDrawIndexedIndirect-OpImageWrite-08795
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 the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag 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 the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdDrawIndexedIndirect-None-07288
Any shader invocation executed by this command must terminate -
VUID-vkCmdDrawIndexedIndirect-None-09600
If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written -
VUID-vkCmdDrawIndexedIndirect-renderPass-02684
The current render pass must be compatible with therenderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound to VK_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 to VK_PIPELINE_BIND_POINT_GRAPHICS -
VUID-vkCmdDrawIndexedIndirect-OpTypeImage-07468
If any shader executed by this pipeline accesses anOpTypeImagevariable with aDimoperand ofSubpassData, it must be decorated with anInputAttachmentIndexthat corresponds to a valid input attachment in the current subpass -
VUID-vkCmdDrawIndexedIndirect-None-07469
Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition, and be created with a VkImageView that is compatible with the attachment referenced by the subpass'pInputAttachments[InputAttachmentIndex] in the bound VkFramebuffer as specified by Fragment Input Attachment Compatibility -
VUID-vkCmdDrawIndexedIndirect-None-06537
Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command -
VUID-vkCmdDrawIndexedIndirect-None-10795
If a color attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment by this command -
VUID-vkCmdDrawIndexedIndirect-None-10796
If a depth attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment by this command -
VUID-vkCmdDrawIndexedIndirect-None-10797
If a stencil attachment is written by any prior command in this subpass or by the load, store, or resolve operations for this subpass, it must not be accessed in any way other than as an attachment by this command -
VUID-vkCmdDrawIndexedIndirect-None-12338
If a color attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, the color attachment must not be written to by this command -
VUID-vkCmdDrawIndexedIndirect-None-12339
If a depth attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, the depth attachment must not be written to by this command -
VUID-vkCmdDrawIndexedIndirect-None-12340
If a stencil attachment is read in this command in any way other than as an attachment, or has been read by any prior command in this subpass as a non-attachment, the stencil attachment must not be written to by this command -
VUID-vkCmdDrawIndexedIndirect-None-06886
If the current render pass instance uses a depth/stencil attachment with a read-only layout for the depth aspect, depth writes must be disabled -
VUID-vkCmdDrawIndexedIndirect-None-06887
If the current render pass instance uses a depth/stencil attachment with a read-only layout for the stencil aspect, both front and backwriteMaskare not zero, and stencil test is enabled, all stencil ops must be VK_STENCIL_OP_KEEP -
VUID-vkCmdDrawIndexedIndirect-None-07831
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled then vkCmdSetViewport must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07832
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled then vkCmdSetScissor must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-08617
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the effective rasterization input topology is in line topology class, then vkCmdSetLineWidth must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07834
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofdepthBiasEnableis VK_TRUE, then vkCmdSetDepthBias must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07835
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and an active color attachment current value ofblendEnableis VK_TRUE with a blend equations where any VkBlendFactor member is VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, then vkCmdSetBlendConstants must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07836
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofdepthBoundsTestEnableis VK_TRUE, then vkCmdSetDepthBounds must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07837
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofstencilTestEnableis VK_TRUE, then vkCmdSetStencilCompareMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07838
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofstencilTestEnableis VK_TRUE, then vkCmdSetStencilWriteMask must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07839
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, the current value of andrasterizerDiscardEnableis VK_FALSE, the current value ofstencilTestEnableis VK_TRUE, then vkCmdSetStencilReference must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-maxMultiviewInstanceIndex-02688
If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to VkPhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex -
VUID-vkCmdDrawIndexedIndirect-sampleLocationsEnable-02689
If the bound graphics pipeline was created with VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnableset to VK_TRUE, then the active depth attachment must have been created with the VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set -
VUID-vkCmdDrawIndexedIndirect-None-06666
If theVK_EXT_sample_locationsextension is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofsampleLocationsEnableis VK_TRUE, then vkCmdSetSampleLocationsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07840
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_CULL_MODE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, then vkCmdSetCullMode must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07841
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_FRONT_FACE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, then vkCmdSetFrontFace must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07843
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, vkCmdSetDepthTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07844
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofdepthTestEnableis VK_TRUE, then vkCmdSetDepthWriteEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07845
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_COMPARE_OP dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value ofdepthTestEnableis VK_TRUE, then vkCmdSetDepthCompareOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07846
If thedepthBoundsfeature is enabled, a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, then vkCmdSetDepthBoundsTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07847
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, then vkCmdSetStencilTestEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-07848
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_STENCIL_OP dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, the current value ofstencilTestEnableis VK_TRUE, then vkCmdSetStencilOp must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-viewportCount-03417
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, then vkCmdSetViewportWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-scissorCount-03418
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic state enabled, then vkCmdSetScissorWithCount must have been called and not subsequently invalidated in the current command buffer prior to this drawing -
VUID-vkCmdDrawIndexedIndirect-viewportCount-03419
If a graphics pipeline is bound which was created with both the VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic states enabled, then theviewportCountparameter ofvkCmdSetViewportWithCountEXTmust match thescissorCountparameter ofvkCmdSetScissorWithCountEXT -
VUID-vkCmdDrawIndexedIndirect-None-04876
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state enabled, then vkCmdSetRasterizerDiscardEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-04877
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE dynamic state enabled, and the current value ofrasterizerDiscardEnableis VK_FALSE, then vkCmdSetDepthBiasEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-logicOp-04878
If a graphics pipeline is bound which was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, and the current value oflogicOpEnableis VK_TRUE, then vkCmdSetLogicOpEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-primitiveFragmentShadingRateWithMultipleViewports-04552
If theprimitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT dynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCount must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountEXTmust be1 -
VUID-vkCmdDrawIndexedIndirect-blendEnable-04727
If a graphics pipeline is bound which was created with VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT dynamic state enabled, the current value ofrasterizerDiscardEnableis VK_FALSE, then for each color attachment, if the corresponding image view’s format features do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the corresponding current value ofblendEnablemust be VK_FALSE -
VUID-vkCmdDrawIndexedIndirect-None-08644
If a graphics pipeline is bound, the current value ofrasterizerDiscardEnableis VK_FALSE,then the current value of
rasterizationSamplesmust be the same as the current color and/or depth/stencil attachments -
VUID-vkCmdDrawIndexedIndirect-maxFragmentDualSrcAttachments-09239
If blending is enabled for any attachment where either the source or destination blend factors for that attachment use the secondary color input, the maximum value ofLocationfor any output attachment statically used in theFragmentExecutionModelexecuted by this command must be less thanmaxFragmentDualSrcAttachments
-
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
If therobustBufferAccessfeature is not enabled, then for a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in [fxvertex-input] -
VUID-vkCmdDrawIndexedIndirect-format-10389
For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::formator VkVertexInputAttributeDescription2EXT::formatis a packed format, the value ofattribAddress, calculated as described in Vertex Input Calculation, must be a multiple of the size of theformat -
VUID-vkCmdDrawIndexedIndirect-format-10390
For each vertex attribute accessed by this command, if its VkVertexInputAttributeDescription::formator VkVertexInputAttributeDescription2EXT::formatis not a packed format, the value ofattribAddress, calculated as described in Vertex Input Calculation, must be a multiple of the component size of theformat -
VUID-vkCmdDrawIndexedIndirect-None-07842
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then vkCmdSetPrimitiveTopology must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-dynamicPrimitiveTopologyUnrestricted-07500
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled then theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10286
If a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage is bound, then the current value ofprimitiveTopologymust be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10747
If vkCmdSetPrimitiveTopology setprimitiveTopologyto VK_PRIMITIVE_TOPOLOGY_PATCH_LIST prior to this drawing command, then a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage must be bound -
VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10748
If vkCmdSetPrimitiveTopology setprimitiveTopologyto VK_PRIMITIVE_TOPOLOGY_POINT_LIST prior to this drawing command, both a VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT and VK_SHADER_STAGE_GEOMETRY_BIT stage are not bound, then theVertexExecutionModelmust have aPointSizedecorated variable that is statically written to -
VUID-vkCmdDrawIndexedIndirect-pStrides-04913
If the bound graphics pipeline was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, but without the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then vkCmdBindVertexBuffers2 must have been called and not subsequently invalidated in the current command buffer prior to this draw command, and thepStridesparameter of vkCmdBindVertexBuffers2 must not beNULL -
VUID-vkCmdDrawIndexedIndirect-None-04914
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then vkCmdSetVertexInputEXT must have been called and not subsequently invalidated in the current command buffer prior to this draw command -
VUID-vkCmdDrawIndexedIndirect-Input-07939
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then all variables with theInputstorage class decorated withLocationin theVertexExecutionModelOpEntryPointmust contain a location in VkVertexInputAttributeDescription2EXT::location -
VUID-vkCmdDrawIndexedIndirect-Input-08734
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled then the numeric type associated with allInputvariables of the correspondingLocationin theVertexExecutionModelOpEntryPointmust be the same as VkVertexInputAttributeDescription2EXT::format -
VUID-vkCmdDrawIndexedIndirect-format-08936
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::formathas a 64-bit component, then the scalar width associated with allInputvariables of the correspondingLocationin theVertexExecutionModelOpEntryPointmust be 64-bit -
VUID-vkCmdDrawIndexedIndirect-format-08937
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and the scalar width associated with aLocationdecoratedInputvariable in theVertexExecutionModelOpEntryPointis 64-bit, then the corresponding VkVertexInputAttributeDescription2EXT::formatmust have a 64-bit component -
VUID-vkCmdDrawIndexedIndirect-None-09203
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled and VkVertexInputAttributeDescription2EXT::formathas a 64-bit component, then allInputvariables at the correspondingLocationin theVertexExecutionModelOpEntryPointmust not use components that are not present in the format -
VUID-vkCmdDrawIndexedIndirect-None-04875
If the bound graphics pipeline state was created with both a VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, and the current value ofprimitiveTopologyis VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then vkCmdSetPatchControlPointsEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-04879
If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-09637
If the input assembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, or VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled, then vkCmdSetPrimitiveRestartEnable must be VK_FALSE -
VUID-vkCmdDrawIndexedIndirect-None-10909
If the input assembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled then vkCmdSetPrimitiveRestartEnable must be VK_FALSE -
VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12239
If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain anOpExecutionModeinstruction specifying the type of subdivision, they must be the same -
VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12240
If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain anOpExecutionModeinstruction specifying the orientation of triangles, they must be the same -
VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12241
If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain anOpExecutionModeinstruction specifying the segment spacing, they must be the same -
VUID-vkCmdDrawIndexedIndirect-OpExecutionMode-12242
If a shader is bound to both the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT and VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stages, and if both stages contain anOpExecutionModeinstruction specifying the output patch size, they must be the same
-
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 the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag 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-None-07312
A valid index buffer must be bound -
VUID-vkCmdDrawIndexedIndirect-drawCount-00528
IfdrawCountis greater than1,stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawIndexedIndirectCommand) -
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 VK_QUEUE_GRAPHICS_BIT 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 | Command Type |
|---|---|---|---|
Primary |
Inside |
VK_QUEUE_GRAPHICS_BIT |
Action |
Document Notes
For more information, see the Vulkan Specification.
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.