C Specification
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);
Parameters
-
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.
Description
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-07027
For any VkImageView being written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDraw-OpTypeImage-07028
For any VkImageView being read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdDraw-OpTypeImage-07029
For any VkBufferView being written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must containVK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdDraw-OpTypeImage-07030
Any VkBufferView being read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features 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 [descriptorsets-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 [descriptorsets-compatibility] -
VUID-vkCmdDraw-None-08114
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 and the boundVkPipelinewas not created withVK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdDraw-None-08115
If the descriptors used by theVkPipelinebound to the pipeline bind point were specified viavkCmdBindDescriptorSets, the boundVkPipelinemust have been created withoutVK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdDraw-None-08116
Descriptors in bound descriptor buffers, specified viavkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by theVkPipelinebound to the pipeline bind point used by this command and the boundVkPipelinewas created withVK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdDraw-None-08117
If the descriptors used by theVkPipelinebound to the pipeline bind point were specified viavkCmdSetDescriptorBufferOffsetsEXT, the boundVkPipelinemust have been created withVK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdDraw-None-08119
If a descriptor is dynamically used with aVkPipelinecreated withVK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident. -
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-OpImageWeightedSampleQCOM-06971
IfOpImageWeightedSampleQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM -
VUID-vkCmdDraw-OpImageWeightedSampleQCOM-06972
IfOpImageWeightedSampleQCOMuses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM -
VUID-vkCmdDraw-OpImageBoxFilterQCOM-06973
IfOpImageBoxFilterQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM -
VUID-vkCmdDraw-OpImageBlockMatchSSDQCOM-06974
IfOpImageBlockMatchSSDQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdDraw-OpImageBlockMatchSADQCOM-06975
IfOpImageBlockMatchSADQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must containVK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdDraw-OpImageBlockMatchSADQCOM-06976
IfOpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation. -
VUID-vkCmdDraw-OpImageWeightedSampleQCOM-06977
IfOpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must have been created withVK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM. -
VUID-vkCmdDraw-OpImageWeightedSampleQCOM-06978
If any command other thanOpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must not have been created withVK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM. -
VUID-vkCmdDraw-None-07288
Any shader invocation executed by this command must terminate -
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-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-vkCmdDraw-None-07469
Input attachment views accessed in a subpass must be created with the same VkFormat as the corresponding subpass definition be created with a VkImageView that is an attachment in the currently bound VkFramebuffer at an index that corresponds to a valid input attachment in the current subpass -
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 from VkPipelineViewportStateCreateInfo, 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 from VkPipelineViewportStateCreateInfo, 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-multisampledRenderToSingleSampled-07284
If rasterization is not disabled in the bound graphics pipeline, and none of theVK_AMD_mixed_attachment_samplesextension, theVK_NV_framebuffer_mixed_samplesextension, or themultisampledRenderToSingleSampledfeature 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-colorAttachmentCount-07616
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCountgreater than0, then each element of the VkRenderingInfo::pColorAttachmentsarray with aimageViewequal to VK_NULL_HANDLE must have the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound pipeline equal toVK_FORMAT_UNDEFINED -
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-pDepthAttachment-07617
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pDepthAttachment->imageViewwas VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal toVK_FORMAT_UNDEFINED -
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-pStencilAttachment-07618
If the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::pStencilAttachment->imageViewwas VK_NULL_HANDLE, the value of VkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal toVK_FORMAT_UNDEFINED -
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-multisampledRenderToSingleSampled-07285
If the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and themultisampledRenderToSingleSampledfeature is not enabled, 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-multisampledRenderToSingleSampled-07286
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and themultisampledRenderToSingleSampledfeature is not enabled, 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-multisampledRenderToSingleSampled-07287
If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and themultisampledRenderToSingleSampledfeature is not enabled, 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-None-07619
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXTdynamic state enabled then vkCmdSetTessellationDomainOriginEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07620
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXTdynamic state enabled then vkCmdSetDepthClampEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07621
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_POLYGON_MODE_EXTdynamic state enabled then vkCmdSetPolygonModeEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07622
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTdynamic state enabled then vkCmdSetRasterizationSamplesEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07623
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_MASK_EXTdynamic state enabled then vkCmdSetSampleMaskEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07624
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXTdynamic state enabled then vkCmdSetAlphaToCoverageEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07625
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXTdynamic state enabled then vkCmdSetAlphaToOneEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07626
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXTdynamic state enabled then vkCmdSetLogicOpEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07627
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXTdynamic state enabled then vkCmdSetColorBlendEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07628
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXTdynamic state enabled then vkCmdSetColorBlendEquationEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07629
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXTdynamic state enabled then vkCmdSetColorWriteMaskEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07630
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXTdynamic state enabled then vkCmdSetRasterizationStreamEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07631
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXTdynamic state enabled then vkCmdSetConservativeRasterizationModeEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07632
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXTdynamic state enabled then vkCmdSetExtraPrimitiveOverestimationSizeEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07633
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXTdynamic state enabled then vkCmdSetDepthClipEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07634
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXTdynamic state enabled then vkCmdSetSampleLocationsEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07635
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXTdynamic state enabled then vkCmdSetColorBlendAdvancedEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07636
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXTdynamic state enabled then vkCmdSetProvokingVertexModeEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07637
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXTdynamic state enabled then vkCmdSetLineRasterizationModeEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07638
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXTdynamic state enabled then vkCmdSetLineStippleEnableEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07639
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXTdynamic state enabled then vkCmdSetDepthClipNegativeOneToOneEXT must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07640
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NVdynamic state enabled then vkCmdSetViewportWScalingEnableNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07641
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NVdynamic state enabled then vkCmdSetViewportSwizzleNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07642
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NVdynamic state enabled then vkCmdSetCoverageToColorEnableNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07643
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NVdynamic state enabled then vkCmdSetCoverageToColorLocationNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07644
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NVdynamic state enabled then vkCmdSetCoverageModulationModeNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07645
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NVdynamic state enabled then vkCmdSetCoverageModulationTableEnableNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07646
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NVdynamic state enabled then vkCmdSetCoverageModulationTableNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07647
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NVdynamic state enabled then vkCmdSetShadingRateImageEnableNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07648
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NVdynamic state enabled then vkCmdSetRepresentativeFragmentTestEnableNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-None-07649
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NVdynamic state enabled then vkCmdSetCoverageReductionModeNV must have been called in the current command buffer prior to this drawing command -
VUID-vkCmdDraw-pColorBlendEnables-07470
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXTstate enabled and the last call to vkCmdSetColorBlendEnableEXT setpColorBlendEnablesfor any attachment toVK_TRUE, then for those attachments in the subpass the corresponding image view’s format features must containVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT -
VUID-vkCmdDraw-rasterizationSamples-07471
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstate enabled, and the current subpass does not use any color and/or depth/stencil attachments, then therasterizationSamplesin the last call to vkCmdSetRasterizationSamplesEXT must follow the rules for a zero-attachment subpass -
VUID-vkCmdDraw-samples-07472
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_MASK_EXTstate enabled and theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstate disabled, then thesamplesparameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to the VkPipelineMultisampleStateCreateInfo::rasterizationSamplesparameter used to create the bound graphics pipeline -
VUID-vkCmdDraw-samples-07473
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_MASK_EXTstate andVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstates enabled, then thesamplesparameter in the last call to vkCmdSetSampleMaskEXT must be greater or equal to therasterizationSamplesparameter in the last call to vkCmdSetRasterizationSamplesEXT -
VUID-vkCmdDraw-multisampledRenderToSingleSampled-07475
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstate enabled, and none of theVK_AMD_mixed_attachment_samplesextension,VK_NV_framebuffer_mixed_samplesextension, or themultisampledRenderToSingleSampledfeature is enabled, then therasterizationSamplesin the last call to vkCmdSetRasterizationSamplesEXT must be the same as the current subpass color and/or depth/stencil attachments -
VUID-vkCmdDraw-firstAttachment-07476
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXTdynamic state enabled then vkCmdSetColorBlendEnableEXT must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachmentandattachmentCountparameters ofvkCmdSetColorBlendEnableEXTcalls must specify an enable for all active color attachments in the current subpass -
VUID-vkCmdDraw-firstAttachment-07477
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXTdynamic state enabled then vkCmdSetColorBlendEquationEXT must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachmentandattachmentCountparameters ofvkCmdSetColorBlendEquationEXTcalls must specify the blend equations for all active color attachments in the current subpass where blending is enabled -
VUID-vkCmdDraw-firstAttachment-07478
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXTdynamic state enabled then vkCmdSetColorWriteMaskEXT must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachmentandattachmentCountparameters ofvkCmdSetColorWriteMaskEXTcalls must specify the color write mask for all active color attachments in the current subpass -
VUID-vkCmdDraw-firstAttachment-07479
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXTdynamic state enabled then vkCmdSetColorBlendAdvancedEXT must have been called in the current command buffer prior to this drawing command, and the attachments specified by thefirstAttachmentandattachmentCountparameters ofvkCmdSetColorBlendAdvancedEXTcalls must specify the advanced blend equations for all active color attachments in the current subpass where blending is enabled -
VUID-vkCmdDraw-advancedBlendMaxColorAttachments-07480
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXTandVK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXTdynamic states enabled and the last calls to vkCmdSetColorBlendEnableEXT and vkCmdSetColorBlendAdvancedEXT have enabled advanced blending, then the number of active color attachments in the current subpass must not exceedadvancedBlendMaxColorAttachments -
VUID-vkCmdDraw-primitivesGeneratedQueryWithNonZeroStreams-07481
If theprimitivesGeneratedQueryWithNonZeroStreamsfeature is not enabled and theVK_QUERY_TYPE_PRIMITIVES_GENERATED_EXTquery is active, and the bound graphics pipeline was created withVK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXTstate enabled, the last call to vkCmdSetRasterizationStreamEXT must have set therasterizationStreamto zero -
VUID-vkCmdDraw-sampleLocationsPerPixel-07482
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTstate enabled and theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstate disabled, then thesampleLocationsPerPixelmember ofpSampleLocationsInfoin the last call to vkCmdSetSampleLocationsEXT must equal therasterizationSamplesmember of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with -
VUID-vkCmdDraw-sampleLocationsPerPixel-07483
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTstate enabled and theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstate enabled, then thesampleLocationsPerPixelmember ofpSampleLocationsInfoin the last call to vkCmdSetSampleLocationsEXT must equal therasterizationSamplesparameter of the last call to vkCmdSetRasterizationSamplesEXT -
VUID-vkCmdDraw-sampleLocationsEnable-07484
If the bound graphics pipeline was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXTstate enabled, andsampleLocationsEnablewasVK_TRUEin the last call to vkCmdSetSampleLocationsEnableEXT, and 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-sampleLocationsEnable-07485
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTstate enabled and theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXTstate enabled, and ifsampleLocationsEnablewasVK_TRUEin the last call to vkCmdSetSampleLocationsEnableEXT, then thesampleLocationsInfo.sampleLocationGridSize.widthin the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.widthas returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with asamplesparameter equalingrasterizationSamples -
VUID-vkCmdDraw-sampleLocationsEnable-07486
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTstate enabled and theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXTstate enabled, and ifsampleLocationsEnablewasVK_TRUEin the last call to vkCmdSetSampleLocationsEnableEXT, then thesampleLocationsInfo.sampleLocationGridSize.heightin the last call to vkCmdSetSampleLocationsEXT must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.heightas returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with asamplesparameter equalingrasterizationSamples -
VUID-vkCmdDraw-sampleLocationsEnable-07487
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXTstate enabled, and ifsampleLocationsEnablewasVK_TRUEin the last call to vkCmdSetSampleLocationsEnableEXT, the fragment shader code must not statically use the extended instructionInterpolateAtSample -
VUID-vkCmdDraw-coverageModulationTableEnable-07488
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NVstate enabled and the last call to vkCmdSetCoverageModulationTableEnableNV setcoverageModulationTableEnabletoVK_TRUE, then thecoverageModulationTableCountparameter in the last call to vkCmdSetCoverageModulationTableNV must equal the currentrasterizationSamplesdivided by the number of color samples in the current subpass -
VUID-vkCmdDraw-rasterizationSamples-07489
If theVK_NV_framebuffer_mixed_samplesextension is enabled, and if current subpass has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled in the currently bound pipeline state, then the currentrasterizationSamplesmust be the same as the sample count of the depth/stencil attachment -
VUID-vkCmdDraw-coverageToColorEnable-07490
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NVstate enabled and the last call to vkCmdSetCoverageToColorEnableNV set thecoverageToColorEnabletoVK_TRUE, then the current subpass must have a color attachment at the location selected by the last call to vkCmdSetCoverageToColorLocationNVcoverageToColorLocation, with a VkFormat ofVK_FORMAT_R8_UINT,VK_FORMAT_R8_SINT,VK_FORMAT_R16_UINT,VK_FORMAT_R16_SINT,VK_FORMAT_R32_UINT, orVK_FORMAT_R32_SINT -
VUID-vkCmdDraw-coverageReductionMode-07491
If thisVK_NV_coverage_reduction_modeextension is enabled, the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NVandVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXTstates enabled, the current coverage reduction modecoverageReductionMode, then the currentrasterizationSamples, and the sample counts for the color and depth/stencil attachments (if the subpass has them) must be a valid combination returned by vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV -
VUID-vkCmdDraw-viewportCount-07492
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theVK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NVdynamic state enabled, then the bound graphics pipeline must have been created with VkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-viewportCount-07493
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_VIEWPORT_WITH_COUNTandVK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NVdynamic states enabled then theviewportCountparameter in the last call to vkCmdSetViewportSwizzleNV must be greater than or equal to theviewportCountparameter in the last call to vkCmdSetViewportWithCount -
VUID-vkCmdDraw-rasterizationSamples-07494
If theVK_NV_framebuffer_mixed_samplesextension is enabled, and if the current subpass has any color attachments andrasterizationSamplesof the last call to vkCmdSetRasterizationSamplesEXT is greater than the number of color samples, then the pipelinesampleShadingEnablemust beVK_FALSE -
VUID-vkCmdDraw-stippledLineEnable-07495
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXTorVK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXTdynamic states enabled, and if the currentstippledLineEnablestate isVK_TRUEand the currentlineRasterizationModestate isVK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT, then thestippledRectangularLinesfeature must be enabled -
VUID-vkCmdDraw-stippledLineEnable-07496
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXTorVK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXTdynamic states enabled, and if the currentstippledLineEnablestate isVK_TRUEand the currentlineRasterizationModestate isVK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT, then thestippledBresenhamLinesfeature must be enabled -
VUID-vkCmdDraw-stippledLineEnable-07497
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXTorVK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXTdynamic states enabled, and if the currentstippledLineEnablestate isVK_TRUEand the currentlineRasterizationModestate isVK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then thestippledSmoothLinesfeature must be enabled -
VUID-vkCmdDraw-stippledLineEnable-07498
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXTorVK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXTdynamic states enabled, and if the currentstippledLineEnablestate isVK_TRUEand the currentlineRasterizationModestate isVK_LINE_RASTERIZATION_MODE_DEFAULT_EXT, then thestippledRectangularLinesfeature must be enabled and VkPhysicalDeviceLimits::strictLinesmust be VK_TRUE -
VUID-vkCmdDraw-conservativePointAndLineRasterization-07499
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXTdynamic state enabled,conservativePointAndLineRasterizationis not supported, and the effective primitive topology output by the last pre-rasterization shader stage is a line or point, then theconservativeRasterizationModeset by the last call to vkCmdSetConservativeRasterizationModeEXT must beVK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT -
VUID-vkCmdDraw-stage-07073
If the currently bound pipeline was 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, then Mesh Shader Queries must not be active
-
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 [fxvertex-input] -
VUID-vkCmdDraw-dynamicPrimitiveTopologyUnrestricted-07500
If the bound graphics pipeline state was created with theVK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled and thedynamicPrimitiveTopologyUnrestrictedisVK_FALSE, then theprimitiveTopologyparameter in the last call to vkCmdSetPrimitiveTopology must 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_ENABLEdynamic state enabled then vkCmdSetPrimitiveRestartEnable 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_EXTorVK_SHADER_STAGE_MESH_BIT_EXT
-
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 -
VUID-vkCmdDraw-videocoding
This command must only be called outside of a video coding scope
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Inside |
Outside |
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.