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 toVK_FILTER_LINEAR,reductionModeequal toVK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal 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-magFilter-09598
If a VkSampler created withmagFilterorminFilterequal toVK_FILTER_LINEARandreductionModeequal to eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXis 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_MINMAX_BIT -
VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal toVK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal 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-09599
If a VkSampler created withmipmapModeequal toVK_SAMPLER_MIPMAP_MODE_LINEARandreductionModeequal to eitherVK_SAMPLER_REDUCTION_MODE_MINorVK_SAMPLER_REDUCTION_MODE_MAXis 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_MINMAX_BIT -
VUID-vkCmdDrawIndexedIndirect-unnormalizedCoordinates-09635
If a VkSampler created withunnormalizedCoordinatesequal toVK_TRUEis 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 toVK_TRUEis used to sample a VkImageView as a result of this command, then the image view’sviewTypemust beVK_IMAGE_VIEW_TYPE_1DorVK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdDrawIndexedIndirect-None-08610
If a VkSampler created withunnormalizedCoordinatesequal toVK_TRUEis 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 toVK_TRUEis 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 containsVK_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 containVK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdDrawIndexedIndirect-None-07888
If aVK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERdescriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must containVK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT -
VUID-vkCmdDrawIndexedIndirect-None-02692
If a VkImageView is 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-None-02693
If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled withVK_FILTER_CUBIC_EXTas a result of this command, it must not have a VkImageViewType ofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY -
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 by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned by vkGetPhysicalDeviceImageFormatProperties2 -
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 by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdDrawIndexedIndirect-None-08600
For each set n that is statically used by a bound shader, 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
For each push constant that is statically used by a bound shader, a push constant 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 , as described in [descriptorsets-compatibility] -
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 as described by descriptor validity if they are statically used by a bound shader -
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 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-None-07288
Any shader invocation executed by this command must terminate -
VUID-vkCmdDrawIndexedIndirect-None-09600
If a descriptor with type equal to any ofVK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, orVK_DESCRIPTOR_TYPE_INPUT_ATTACHMENTis 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 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-07748
If any shader statically accesses an input attachment, a valid descriptor must be bound to the pipeline via a descriptor set -
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-06539
If any previously recorded command in the current subpass accessed an image subresource used as an attachment in this subpass 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, both front and backwriteMaskare not zero, and stencil test is enabled, all stencil ops must beVK_STENCIL_OP_KEEP -
VUID-vkCmdDrawIndexedIndirect-None-07831
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORTdynamic 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 theVK_DYNAMIC_STATE_SCISSORdynamic 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-07833
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_WIDTHdynamic state enabled 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 theVK_DYNAMIC_STATE_DEPTH_BIASdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofdepthBiasEnableisVK_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 the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_BLEND_CONSTANTSdynamic state enabled 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 theVK_DYNAMIC_STATE_DEPTH_BOUNDSdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofdepthBoundsTestEnableisVK_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 theVK_DYNAMIC_STATE_STENCIL_COMPARE_MASKdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofstencilTestEnableisVK_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 theVK_DYNAMIC_STATE_STENCIL_WRITE_MASKdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofstencilTestEnableisVK_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 theVK_DYNAMIC_STATE_STENCIL_REFERENCEdynamic state enabled, the current value of andrasterizerDiscardEnableisVK_FALSE, the current value ofstencilTestEnableisVK_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 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 theVK_EXT_sample_locationsextension is enabled, a graphics pipeline is bound which was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofsampleLocationsEnableisVK_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 theVK_DYNAMIC_STATE_CULL_MODEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, then vkCmdSetCullModeEXT 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 theVK_DYNAMIC_STATE_FRONT_FACEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, then vkCmdSetFrontFaceEXT 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 theVK_DYNAMIC_STATE_DEPTH_TEST_ENABLEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, vkCmdSetDepthTestEnableEXT 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 theVK_DYNAMIC_STATE_DEPTH_WRITE_ENABLEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofdepthTestEnableisVK_TRUE, then vkCmdSetDepthWriteEnableEXT 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 theVK_DYNAMIC_STATE_DEPTH_COMPARE_OPdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value ofdepthTestEnableisVK_TRUE, then vkCmdSetDepthCompareOpEXT 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 theVK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, then vkCmdSetDepthBoundsTestEnableEXT 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 theVK_DYNAMIC_STATE_STENCIL_TEST_ENABLEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, then vkCmdSetStencilTestEnableEXT 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 theVK_DYNAMIC_STATE_STENCIL_OPdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, the current value ofstencilTestEnableisVK_TRUE, then vkCmdSetStencilOpEXT 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 theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, then vkCmdSetViewportWithCountEXT 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 theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, then vkCmdSetScissorWithCountEXT 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 theVK_DYNAMIC_STATE_SCISSOR_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled, then theviewportCountparameter ofvkCmdSetViewportWithCountEXTmust match thescissorCountparameter ofvkCmdSetScissorWithCountEXT -
VUID-vkCmdDrawIndexedIndirect-None-04876
If a graphics pipeline is bound which was created with theVK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled, then vkCmdSetRasterizerDiscardEnableEXT 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 theVK_DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled, and the current value ofrasterizerDiscardEnableisVK_FALSE, then vkCmdSetDepthBiasEnableEXT 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 theVK_DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled, the current value ofrasterizerDiscardEnableisVK_FALSE, and the current value oflogicOpEnableisVK_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 theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, then vkCmdSetViewportWithCountEXT must have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountEXTmust 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-None-08644
If a graphics pipeline is bound, the current value ofrasterizerDiscardEnableisVK_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 theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGYdynamic state enabled then vkCmdSetPrimitiveTopologyEXT 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 theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGYdynamic state enabled then theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipeline VkPipelineInputAssemblyStateCreateInfo::topologystate -
VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10286
If aVK_SHADER_STAGE_TESSELLATION_CONTROL_BITstage is bound, then the current value ofprimitiveTopologymust beVK_PRIMITIVE_TOPOLOGY_PATCH_LISTprior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10747
If vkCmdSetPrimitiveTopologyEXT setprimitiveTopologytoVK_PRIMITIVE_TOPOLOGY_PATCH_LISTprior to this drawing command, then aVK_SHADER_STAGE_TESSELLATION_CONTROL_BITstage must be bound -
VUID-vkCmdDrawIndexedIndirect-primitiveTopology-10748
If vkCmdSetPrimitiveTopologyEXT setprimitiveTopologytoVK_PRIMITIVE_TOPOLOGY_POINT_LISTprior to this drawing command, both aVK_SHADER_STAGE_TESSELLATION_EVALUATION_BITandVK_SHADER_STAGE_GEOMETRY_BITstage 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 theVK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDEdynamic state enabled, but without theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, then vkCmdBindVertexBuffers2EXT must have been called and not subsequently invalidated 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 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 theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic 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 theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic 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 theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic 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 theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic 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 theVK_DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic 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 aVK_SHADER_STAGE_TESSELLATION_CONTROL_BITstage and theVK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled, and the current value ofprimitiveTopologyisVK_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 theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLEdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must have been called and not subsequently invalidated in the current command buffer prior to this drawing command -
VUID-vkCmdDrawIndexedIndirect-None-09637
If the topology isVK_PRIMITIVE_TOPOLOGY_POINT_LIST,VK_PRIMITIVE_TOPOLOGY_LINE_LIST,VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, orVK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLEdynamic state enabled then vkCmdSetPrimitiveRestartEnableEXT must beVK_FALSE
-
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-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 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 | Command Type |
|---|---|---|---|
Primary |
Inside |
Graphics |
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.