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