1e5c31af7Sopenharmony_ci// Copyright 2019-2021 The Khronos Group Inc. 2e5c31af7Sopenharmony_ci// 3e5c31af7Sopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ci// Common Valid Usage 6e5c31af7Sopenharmony_ci// Common to all drawing commands 7e5c31af7Sopenharmony_ciinclude::{chapters}/commonvalidity/draw_dispatch_common.txt[] 8e5c31af7Sopenharmony_ci * [[VUID-{refpage}-renderPass-02684]] 9e5c31af7Sopenharmony_ci The current render pass must: be <<renderpass-compatibility,compatible>> 10e5c31af7Sopenharmony_ci with the pname:renderPass member of the 11e5c31af7Sopenharmony_ci sname:VkGraphicsPipelineCreateInfo structure specified when creating the 12e5c31af7Sopenharmony_ci sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS 13e5c31af7Sopenharmony_ci * [[VUID-{refpage}-subpass-02685]] 14e5c31af7Sopenharmony_ci The subpass index of the current render pass must: be equal to the 15e5c31af7Sopenharmony_ci pname:subpass member of the sname:VkGraphicsPipelineCreateInfo structure 16e5c31af7Sopenharmony_ci specified when creating the sname:VkPipeline bound to 17e5c31af7Sopenharmony_ci ename:VK_PIPELINE_BIND_POINT_GRAPHICS 18e5c31af7Sopenharmony_ci * [[VUID-{refpage}-None-02686]] 19e5c31af7Sopenharmony_ci Every input attachment used by the current subpass must: be bound to the 20e5c31af7Sopenharmony_ci pipeline via a descriptor set 21e5c31af7Sopenharmony_ci * [[VUID-{refpage}-None-04584]] 22e5c31af7Sopenharmony_ci Image subresources used as attachments in the current render pass must: 23e5c31af7Sopenharmony_ci not be accessed in any way other than as an attachment by this command, 24e5c31af7Sopenharmony_ci except for cases involving read-only access to depth/stencil attachments 25e5c31af7Sopenharmony_ci as described in the <<renderpass-attachment-nonattachment, Render Pass>> 26e5c31af7Sopenharmony_ci chapter 27e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_multiview[] 28e5c31af7Sopenharmony_ci * [[VUID-{refpage}-maxMultiviewInstanceIndex-02688]] 29e5c31af7Sopenharmony_ci If the draw is recorded in a render pass instance with multiview 30e5c31af7Sopenharmony_ci enabled, the maximum instance index must: be less than or equal to 31e5c31af7Sopenharmony_ci slink:VkPhysicalDeviceMultiviewProperties::pname:maxMultiviewInstanceIndex 32e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_multiview[] 33e5c31af7Sopenharmony_ciifdef::VK_EXT_sample_locations[] 34e5c31af7Sopenharmony_ci * [[VUID-{refpage}-sampleLocationsEnable-02689]] 35e5c31af7Sopenharmony_ci If the bound graphics pipeline was created with 36e5c31af7Sopenharmony_ci slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable 37e5c31af7Sopenharmony_ci set to ename:VK_TRUE and the current subpass has a depth/stencil 38e5c31af7Sopenharmony_ci attachment, then that attachment must: have been created with the 39e5c31af7Sopenharmony_ci ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set 40e5c31af7Sopenharmony_ciendif::VK_EXT_sample_locations[] 41e5c31af7Sopenharmony_ciifdef::VK_EXT_extended_dynamic_state[] 42e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewportCount-03417]] 43e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 44e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, 45e5c31af7Sopenharmony_ci but not the ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state 46e5c31af7Sopenharmony_ci enabled, then flink:vkCmdSetViewportWithCountEXT must: have been called 47e5c31af7Sopenharmony_ci in the current command buffer prior to this drawing command, and the 48e5c31af7Sopenharmony_ci pname:viewportCount parameter of fname:vkCmdSetViewportWithCountEXT 49e5c31af7Sopenharmony_ci must: match the 50e5c31af7Sopenharmony_ci sname:VkPipelineViewportStateCreateInfo::pname:scissorCount of the 51e5c31af7Sopenharmony_ci pipeline 52e5c31af7Sopenharmony_ci * [[VUID-{refpage}-scissorCount-03418]] 53e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 54e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT dynamic state enabled, but 55e5c31af7Sopenharmony_ci not the ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state 56e5c31af7Sopenharmony_ci enabled, then flink:vkCmdSetScissorWithCountEXT must: have been called 57e5c31af7Sopenharmony_ci in the current command buffer prior to this drawing command, and the 58e5c31af7Sopenharmony_ci pname:scissorCount parameter of fname:vkCmdSetScissorWithCountEXT must: 59e5c31af7Sopenharmony_ci match the sname:VkPipelineViewportStateCreateInfo::pname:viewportCount 60e5c31af7Sopenharmony_ci of the pipeline 61e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewportCount-03419]] 62e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with both the 63e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT and 64e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic states enabled 65e5c31af7Sopenharmony_ci then both flink:vkCmdSetViewportWithCountEXT and 66e5c31af7Sopenharmony_ci flink:vkCmdSetScissorWithCountEXT must: have been called in the current 67e5c31af7Sopenharmony_ci command buffer prior to this drawing command, and the 68e5c31af7Sopenharmony_ci pname:viewportCount parameter of fname:vkCmdSetViewportWithCountEXT 69e5c31af7Sopenharmony_ci must: match the pname:scissorCount parameter of 70e5c31af7Sopenharmony_ci fname:vkCmdSetScissorWithCountEXT 71e5c31af7Sopenharmony_ciifdef::VK_NV_clip_space_w_scaling[] 72e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewportCount-04137]] 73e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 74e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, 75e5c31af7Sopenharmony_ci but not the ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state 76e5c31af7Sopenharmony_ci enabled, then the bound graphics pipeline must: have been created with 77e5c31af7Sopenharmony_ci slink:VkPipelineViewportWScalingStateCreateInfoNV::pname:viewportCount 78e5c31af7Sopenharmony_ci greater or equal to the pname:viewportCount parameter in the last call 79e5c31af7Sopenharmony_ci to flink:vkCmdSetViewportWithCountEXT 80e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewportCount-04138]] 81e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 82e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and 83e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic states enabled then 84e5c31af7Sopenharmony_ci the pname:viewportCount parameter in the last call to 85e5c31af7Sopenharmony_ci flink:vkCmdSetViewportWScalingNV must: be greater than or equal to the 86e5c31af7Sopenharmony_ci pname:viewportCount parameter in the last call to 87e5c31af7Sopenharmony_ci flink:vkCmdSetViewportWithCountEXT 88e5c31af7Sopenharmony_ciendif::VK_NV_clip_space_w_scaling[] 89e5c31af7Sopenharmony_ciifdef::VK_NV_shading_rate_image[] 90e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewportCount-04139]] 91e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 92e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, 93e5c31af7Sopenharmony_ci but not the ename:VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV 94e5c31af7Sopenharmony_ci dynamic state enabled, then the bound graphics pipeline must: have been 95e5c31af7Sopenharmony_ci created with 96e5c31af7Sopenharmony_ci slink:VkPipelineViewportShadingRateImageStateCreateInfoNV::pname:viewportCount 97e5c31af7Sopenharmony_ci greater or equal to the pname:viewportCount parameter in the last call 98e5c31af7Sopenharmony_ci to flink:vkCmdSetViewportWithCountEXT 99e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewportCount-04140]] 100e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 101e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT and 102e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV dynamic states 103e5c31af7Sopenharmony_ci enabled then the pname:viewportCount parameter in the last call to 104e5c31af7Sopenharmony_ci flink:vkCmdSetViewportShadingRatePaletteNV must: be greater than or 105e5c31af7Sopenharmony_ci equal to the pname:viewportCount parameter in the last call to 106e5c31af7Sopenharmony_ci flink:vkCmdSetViewportWithCountEXT 107e5c31af7Sopenharmony_ciendif::VK_NV_shading_rate_image[] 108e5c31af7Sopenharmony_ciifdef::VK_NV_viewport_swizzle[] 109e5c31af7Sopenharmony_ci * [[VUID-{refpage}-VkPipelineVieportCreateInfo-04141]] 110e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 111e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and 112e5c31af7Sopenharmony_ci a slink:VkPipelineViewportSwizzleStateCreateInfoNV structure chained 113e5c31af7Sopenharmony_ci from pname:VkPipelineVieportCreateInfo, then the bound graphics pipeline 114e5c31af7Sopenharmony_ci must: have been created with 115e5c31af7Sopenharmony_ci slink:VkPipelineViewportSwizzleStateCreateInfoNV::pname:viewportCount 116e5c31af7Sopenharmony_ci greater or equal to the pname:viewportCount parameter in the last call 117e5c31af7Sopenharmony_ci to flink:vkCmdSetViewportWithCountEXT 118e5c31af7Sopenharmony_ciendif::VK_NV_viewport_swizzle[] 119e5c31af7Sopenharmony_ciifdef::VK_NV_scissor_exclusive[] 120e5c31af7Sopenharmony_ci * [[VUID-{refpage}-VkPipelineVieportCreateInfo-04142]] 121e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 122e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled and 123e5c31af7Sopenharmony_ci a slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV structure 124e5c31af7Sopenharmony_ci chained from pname:VkPipelineVieportCreateInfo, then the bound graphics 125e5c31af7Sopenharmony_ci pipeline must: have been created with 126e5c31af7Sopenharmony_ci slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV::pname:exclusiveScissorCount 127e5c31af7Sopenharmony_ci greater or equal to the pname:viewportCount parameter in the last call 128e5c31af7Sopenharmony_ci to flink:vkCmdSetViewportWithCountEXT 129e5c31af7Sopenharmony_ciendif::VK_NV_scissor_exclusive[] 130e5c31af7Sopenharmony_ciendif::VK_EXT_extended_dynamic_state[] 131e5c31af7Sopenharmony_ciifdef::VK_EXT_extended_dynamic_state2[] 132e5c31af7Sopenharmony_ci * [[VUID-{refpage}-None-04876]] 133e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 134e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT dynamic state 135e5c31af7Sopenharmony_ci enabled then flink:vkCmdSetRasterizerDiscardEnableEXT must: have been 136e5c31af7Sopenharmony_ci called in the current command buffer prior to this drawing command 137e5c31af7Sopenharmony_ci * [[VUID-{refpage}-None-04877]] 138e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 139e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT dynamic state enabled then 140e5c31af7Sopenharmony_ci flink:vkCmdSetDepthBiasEnableEXT must: have been called in the current 141e5c31af7Sopenharmony_ci command buffer prior to this drawing command 142e5c31af7Sopenharmony_ci * [[VUID-{refpage}-logicOp-04878]] 143e5c31af7Sopenharmony_ci If the bound graphics pipeline state was created with the 144e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled then 145e5c31af7Sopenharmony_ci flink:vkCmdSetLogicOpEXT must: have been called in the current command 146e5c31af7Sopenharmony_ci buffer prior to this drawing command and the pname:logicOp must: be a 147e5c31af7Sopenharmony_ci valid elink:VkLogicOp value 148e5c31af7Sopenharmony_ciendif::VK_EXT_extended_dynamic_state2[] 149e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate+VK_EXT_extended_dynamic_state[] 150e5c31af7Sopenharmony_ci * [[VUID-{refpage}-primitiveFragmentShadingRateWithMultipleViewports-04552]] 151e5c31af7Sopenharmony_ci If the <<limits-primitiveFragmentShadingRateWithMultipleViewports, 152e5c31af7Sopenharmony_ci pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not 153e5c31af7Sopenharmony_ci supported, the bound graphics pipeline was created with the 154e5c31af7Sopenharmony_ci ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT dynamic state enabled, 155e5c31af7Sopenharmony_ci and any of the shader stages of the bound graphics pipeline write to the 156e5c31af7Sopenharmony_ci code:PrimitiveShadingRateKHR built-in, then 157e5c31af7Sopenharmony_ci flink:vkCmdSetViewportWithCountEXT must: have been called in the current 158e5c31af7Sopenharmony_ci command buffer prior to this drawing command, and the 159e5c31af7Sopenharmony_ci pname:viewportCount parameter of fname:vkCmdSetViewportWithCountEXT 160e5c31af7Sopenharmony_ci must: be `1` 161e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate+VK_EXT_extended_dynamic_state[] 162e5c31af7Sopenharmony_ci * [[VUID-{refpage}-blendEnable-04727]] 163e5c31af7Sopenharmony_ci If rasterization is not disabled in the bound graphics pipeline, then 164e5c31af7Sopenharmony_ci for each color attachment in the subpass, if the corresponding image 165e5c31af7Sopenharmony_ci view's <<resources-image-view-format-features,format features>> do not 166e5c31af7Sopenharmony_ci contain ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the 167e5c31af7Sopenharmony_ci pname:blendEnable member of the corresponding element of the 168e5c31af7Sopenharmony_ci pname:pAttachments member of pname:pColorBlendState must: be 169e5c31af7Sopenharmony_ci ename:VK_FALSE 170e5c31af7Sopenharmony_ci * [[VUID-{refpage}-rasterizationSamples-04740]] 171e5c31af7Sopenharmony_ci If rasterization is not disabled in the bound graphics pipeline, and 172e5c31af7Sopenharmony_ci neither the `apiext:VK_AMD_mixed_attachment_samples` nor the 173e5c31af7Sopenharmony_ci `apiext:VK_NV_framebuffer_mixed_samples` extensions are enabled, then 174e5c31af7Sopenharmony_ci slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples 175e5c31af7Sopenharmony_ci must: be the same as the current subpass color and/or depth/stencil 176e5c31af7Sopenharmony_ci attachments 177e5c31af7Sopenharmony_ciifdef::VK_KHR_dynamic_rendering[] 178e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06172]] 179e5c31af7Sopenharmony_ci If the current render pass instance was begun with 180e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the pname:imageView member of 181e5c31af7Sopenharmony_ci pname:pDepthAttachment is not dlink:VK_NULL_HANDLE, and the pname:layout 182e5c31af7Sopenharmony_ci member of pname:pDepthAttachment is 183e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command 184e5c31af7Sopenharmony_ci must: not write any values to the depth attachment 185e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06173]] 186e5c31af7Sopenharmony_ci If the current render pass instance was begun with 187e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the pname:imageView member of 188e5c31af7Sopenharmony_ci pname:pStencilAttachment is not dlink:VK_NULL_HANDLE, and the 189e5c31af7Sopenharmony_ci pname:layout member of pname:pStencilAttachment is 190e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command 191e5c31af7Sopenharmony_ci must: not write any values to the stencil attachment 192e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_1,VK_KHR_maintenance2[] 193e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06174]] 194e5c31af7Sopenharmony_ci If the current render pass instance was begun with 195e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the pname:imageView member of 196e5c31af7Sopenharmony_ci pname:pDepthAttachment is not dlink:VK_NULL_HANDLE, and the pname:layout 197e5c31af7Sopenharmony_ci member of pname:pDepthAttachment is 198e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this 199e5c31af7Sopenharmony_ci command must: not write any values to the depth attachment 200e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06175]] 201e5c31af7Sopenharmony_ci If the current render pass instance was begun with 202e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the pname:imageView member of 203e5c31af7Sopenharmony_ci pname:pStencilAttachment is not dlink:VK_NULL_HANDLE, and the 204e5c31af7Sopenharmony_ci pname:layout member of pname:pStencilAttachment is 205e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this 206e5c31af7Sopenharmony_ci command must: not write any values to the stencil attachment 207e5c31af7Sopenharmony_ciendif::VK_VERSION_1_1,VK_KHR_maintenance2[] 208e5c31af7Sopenharmony_ciifdef::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 209e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06176]] 210e5c31af7Sopenharmony_ci If the current render pass instance was begun with 211e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the pname:imageView member of 212e5c31af7Sopenharmony_ci pname:pDepthAttachment is not dlink:VK_NULL_HANDLE, and the pname:layout 213e5c31af7Sopenharmony_ci member of pname:pDepthAttachment is 214e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must: not 215e5c31af7Sopenharmony_ci write any values to the depth attachment 216e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06177]] 217e5c31af7Sopenharmony_ci If the current render pass instance was begun with 218e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the pname:imageView member of 219e5c31af7Sopenharmony_ci pname:pStencilAttachment is not dlink:VK_NULL_HANDLE, and the 220e5c31af7Sopenharmony_ci pname:layout member of pname:pStencilAttachment is 221e5c31af7Sopenharmony_ci ename:VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must: not 222e5c31af7Sopenharmony_ci write any values to the stencil attachment 223e5c31af7Sopenharmony_ciendif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] 224e5c31af7Sopenharmony_ci * [[VUID-{refpage}-viewMask-06178]] 225e5c31af7Sopenharmony_ci If the current render pass instance was begun with 226e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound graphics pipeline 227e5c31af7Sopenharmony_ci must: have been created with a 228e5c31af7Sopenharmony_ci slink:VkPipelineRenderingCreateInfoKHR::pname:viewMask equal to 229e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:viewMask 230e5c31af7Sopenharmony_ci * [[VUID-{refpage}-colorAttachmentCount-06179]] 231e5c31af7Sopenharmony_ci If the current render pass instance was begun with 232e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound graphics pipeline 233e5c31af7Sopenharmony_ci must: have been created with a 234e5c31af7Sopenharmony_ci slink:VkPipelineRenderingCreateInfoKHR::pname:colorAttachmentCount equal 235e5c31af7Sopenharmony_ci to slink:VkRenderingInfoKHR::pname:colorAttachmentCount 236e5c31af7Sopenharmony_ci * [[VUID-{refpage}-colorAttachmentCount-06180]] 237e5c31af7Sopenharmony_ci If the current render pass instance was begun with 238e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR and 239e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:colorAttachmentCount greater than `0`, 240e5c31af7Sopenharmony_ci then each element of the 241e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pColorAttachments array with a 242e5c31af7Sopenharmony_ci pname:imageView not equal to dlink:VK_NULL_HANDLE must: have been 243e5c31af7Sopenharmony_ci created with a elink:VkFormat equal to the corresponding element of 244e5c31af7Sopenharmony_ci slink:VkPipelineRenderingCreateInfoKHR::pname:pColorAttachmentFormats 245e5c31af7Sopenharmony_ci used to create the currently bound graphics pipeline 246e5c31af7Sopenharmony_ci * [[VUID-{refpage}-pDepthAttachment-06181]] 247e5c31af7Sopenharmony_ci If the current render pass instance was begun with 248e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR and 249e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pDepthAttachment->pname:imageView was 250e5c31af7Sopenharmony_ci not dlink:VK_NULL_HANDLE, the value of 251e5c31af7Sopenharmony_ci slink:VkPipelineRenderingCreateInfoKHR::pname:depthAttachmentFormat used 252e5c31af7Sopenharmony_ci to create the currently bound graphics pipeline must: be equal to the 253e5c31af7Sopenharmony_ci elink:VkFormat used to create 254e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pDepthAttachment->pname:imageView 255e5c31af7Sopenharmony_ci * [[VUID-{refpage}-pStencilAttachment-06182]] 256e5c31af7Sopenharmony_ci If the current render pass instance was begun with 257e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR and 258e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pStencilAttachment->pname:imageView was 259e5c31af7Sopenharmony_ci not dlink:VK_NULL_HANDLE, the value of 260e5c31af7Sopenharmony_ci slink:VkPipelineRenderingCreateInfoKHR::pname:stencilAttachmentFormat 261e5c31af7Sopenharmony_ci used to create the currently bound graphics pipeline must: be equal to 262e5c31af7Sopenharmony_ci the elink:VkFormat used to create 263e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pStencilAttachment->pname:imageView 264e5c31af7Sopenharmony_ciifdef::VK_KHR_fragment_shading_rate[] 265e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06183]] 266e5c31af7Sopenharmony_ci If the current render pass instance was begun with 267e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR and 268e5c31af7Sopenharmony_ci slink:VkRenderingFragmentShadingRateAttachmentInfoKHR::pname:imageView 269e5c31af7Sopenharmony_ci was not dlink:VK_NULL_HANDLE, the currently bound graphics pipeline 270e5c31af7Sopenharmony_ci must: have been created with 271e5c31af7Sopenharmony_ci ename:VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR 272e5c31af7Sopenharmony_ciendif::VK_KHR_fragment_shading_rate[] 273e5c31af7Sopenharmony_ciifdef::VK_EXT_fragment_density_map[] 274e5c31af7Sopenharmony_ci * [[VUID-{refpage}-imageView-06184]] 275e5c31af7Sopenharmony_ci If the current render pass instance was begun with 276e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR and 277e5c31af7Sopenharmony_ci slink:VkRenderingFragmentDensityMapAttachmentInfoEXT::pname:imageView 278e5c31af7Sopenharmony_ci was not dlink:VK_NULL_HANDLE, the currently bound graphics pipeline 279e5c31af7Sopenharmony_ci must: have been created with 280e5c31af7Sopenharmony_ci ename:VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT 281e5c31af7Sopenharmony_ciendif::VK_EXT_fragment_density_map[] 282e5c31af7Sopenharmony_ciifdef::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[] 283e5c31af7Sopenharmony_ci * [[VUID-{refpage}-colorAttachmentCount-06185]] 284e5c31af7Sopenharmony_ci If the currently bound pipeline was created with a 285e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoAMD or 286e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV structure, and the current render 287e5c31af7Sopenharmony_ci pass instance was begun with flink:vkCmdBeginRenderingKHR with a 288e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:colorAttachmentCount parameter greater 289e5c31af7Sopenharmony_ci than `0`, then each element of the 290e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pColorAttachments array with a 291e5c31af7Sopenharmony_ci pname:imageView not equal to dlink:VK_NULL_HANDLE must: have been 292e5c31af7Sopenharmony_ci created with a sample count equal to the corresponding element of the 293e5c31af7Sopenharmony_ci pname:pColorAttachmentSamples member of 294e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoAMD or 295e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV used to create the currently bound 296e5c31af7Sopenharmony_ci graphics pipeline 297e5c31af7Sopenharmony_ci * [[VUID-{refpage}-pDepthAttachment-06186]] 298e5c31af7Sopenharmony_ci If the current render pass instance was begun with 299e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound pipeline was created 300e5c31af7Sopenharmony_ci with a slink:VkAttachmentSampleCountInfoAMD or 301e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV structure, and 302e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pDepthAttachment->pname:imageView was 303e5c31af7Sopenharmony_ci not dlink:VK_NULL_HANDLE, the value of the 304e5c31af7Sopenharmony_ci pname:depthStencilAttachmentSamples member of 305e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoAMD or 306e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV used to create the currently bound 307e5c31af7Sopenharmony_ci graphics pipeline must: be equal to the sample count used to create 308e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pDepthAttachment->pname:imageView 309e5c31af7Sopenharmony_ci * [[VUID-{refpage}-pStencilAttachment-06187]] 310e5c31af7Sopenharmony_ci If the current render pass instance was begun with 311e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound pipeline was created 312e5c31af7Sopenharmony_ci with a slink:VkAttachmentSampleCountInfoAMD or 313e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV structure, and 314e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pStencilAttachment->pname:imageView was 315e5c31af7Sopenharmony_ci not dlink:VK_NULL_HANDLE, the value of the 316e5c31af7Sopenharmony_ci pname:depthStencilAttachmentSamples member of 317e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoAMD or 318e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV used to create the currently bound 319e5c31af7Sopenharmony_ci graphics pipeline must: be equal to the sample count used to create 320e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pStencilAttachment->pname:imageView 321e5c31af7Sopenharmony_ci * [[VUID-{refpage}-colorAttachmentCount-06188]] 322e5c31af7Sopenharmony_ci If the currently bound pipeline was created without a 323e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoAMD or 324e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV structure, and the current render 325e5c31af7Sopenharmony_ci pass instance was begun with flink:vkCmdBeginRenderingKHR with a 326e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:colorAttachmentCount parameter greater 327e5c31af7Sopenharmony_ci than `0`, then each element of the 328e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pColorAttachments array with a 329e5c31af7Sopenharmony_ci pname:imageView not equal to dlink:VK_NULL_HANDLE must: have been 330e5c31af7Sopenharmony_ci created with a sample count equal to the value of 331e5c31af7Sopenharmony_ci slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples 332e5c31af7Sopenharmony_ci used to create the currently bound graphics pipeline 333e5c31af7Sopenharmony_ci * [[VUID-{refpage}-pDepthAttachment-06189]] 334e5c31af7Sopenharmony_ci If the current render pass instance was begun with 335e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound pipeline was created 336e5c31af7Sopenharmony_ci without a slink:VkAttachmentSampleCountInfoAMD or 337e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV structure, and 338e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pDepthAttachment->pname:imageView was 339e5c31af7Sopenharmony_ci not dlink:VK_NULL_HANDLE, the value of 340e5c31af7Sopenharmony_ci slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples 341e5c31af7Sopenharmony_ci used to create the currently bound graphics pipeline must: be equal to 342e5c31af7Sopenharmony_ci the sample count used to create 343e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pDepthAttachment->pname:imageView 344e5c31af7Sopenharmony_ci * [[VUID-{refpage}-pStencilAttachment-06190]] 345e5c31af7Sopenharmony_ci If the current render pass instance was begun with 346e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound pipeline was created 347e5c31af7Sopenharmony_ci without a slink:VkAttachmentSampleCountInfoAMD or 348e5c31af7Sopenharmony_ci slink:VkAttachmentSampleCountInfoNV structure, and 349e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pStencilAttachment->pname:imageView was 350e5c31af7Sopenharmony_ci not dlink:VK_NULL_HANDLE, the value of 351e5c31af7Sopenharmony_ci slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples 352e5c31af7Sopenharmony_ci used to create the currently bound graphics pipeline must: be equal to 353e5c31af7Sopenharmony_ci the sample count used to create 354e5c31af7Sopenharmony_ci slink:VkRenderingInfoKHR::pname:pStencilAttachment->pname:imageView 355e5c31af7Sopenharmony_ci * [[VUID-{refpage}-renderPass-06198]] 356e5c31af7Sopenharmony_ci If the current render pass instance was begun with 357e5c31af7Sopenharmony_ci flink:vkCmdBeginRenderingKHR, the currently bound pipeline must: have 358e5c31af7Sopenharmony_ci been created with a slink:VkGraphicsPipelineCreateInfo::pname:renderPass 359e5c31af7Sopenharmony_ci equal to dlink:VK_NULL_HANDLE 360e5c31af7Sopenharmony_ciendif::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[] 361e5c31af7Sopenharmony_ciendif::VK_KHR_dynamic_rendering[] 362e5c31af7Sopenharmony_ci// Common Valid Usage 363