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 drawing commands that consume vertex binding state 7 * [[VUID-{refpage}-None-04007]] 8 All vertex input bindings accessed via vertex input variables declared 9 in the vertex shader entry point's interface must: have either valid or 10 dlink:VK_NULL_HANDLE buffers bound 11 * [[VUID-{refpage}-None-04008]] 12 If the <<features-nullDescriptor,nullDescriptor>> feature is not 13 enabled, all vertex input bindings accessed via vertex input variables 14 declared in the vertex shader entry point's interface must: not be 15 dlink:VK_NULL_HANDLE 16 * [[VUID-{refpage}-None-02721]] 17 For a given vertex buffer binding, any attribute data fetched must: be 18 entirely contained within the corresponding vertex buffer binding, as 19 described in <<fxvertex-input>> 20ifdef::VK_EXT_extended_dynamic_state[] 21 * [[VUID-{refpage}-primitiveTopology-03420]] 22 If the bound graphics pipeline state was created with the 23 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT dynamic state enabled then 24 flink:vkCmdSetPrimitiveTopologyEXT must: have been called in the current 25 command buffer prior to this drawing command, and the 26 pname:primitiveTopology parameter of fname:vkCmdSetPrimitiveTopologyEXT 27 must: be of the same <<drawing-primitive-topology-class, topology 28 class>> as the pipeline 29 slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology state 30ifdef::VK_EXT_vertex_input_dynamic_state[] 31 * [[VUID-{refpage}-None-04912]] 32 If the bound graphics pipeline was created with both the 33 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT and 34 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic states 35 enabled, then flink:vkCmdSetVertexInputEXT must: have been called in the 36 current command buffer prior to this draw command 37 * [[VUID-{refpage}-pStrides-04913]] 38 If the bound graphics pipeline was created with the 39 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic state 40 enabled, but not the ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic 41 state enabled, then flink:vkCmdBindVertexBuffers2EXT must: have been 42 called in the current command buffer prior to this draw command, and the 43 pname:pStrides parameter of flink:vkCmdBindVertexBuffers2EXT must: not 44 be `NULL` 45endif::VK_EXT_vertex_input_dynamic_state[] 46ifndef::VK_EXT_vertex_input_dynamic_state[] 47 * [[VUID-{refpage}-pStrides-04884]] 48 If the bound graphics pipeline was created with the 49 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic state 50 enabled, then flink:vkCmdBindVertexBuffers2EXT must: have been called in 51 the current command buffer prior to this drawing command, and the 52 pname:pStrides parameter of flink:vkCmdBindVertexBuffers2EXT must: not 53 be `NULL` 54endif::VK_EXT_vertex_input_dynamic_state[] 55endif::VK_EXT_extended_dynamic_state[] 56ifdef::VK_EXT_vertex_input_dynamic_state[] 57 * [[VUID-{refpage}-None-04914]] 58 If the bound graphics pipeline state was created with the 59 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then 60 flink:vkCmdSetVertexInputEXT must: have been called in the current 61 command buffer prior to this draw command 62endif::VK_EXT_vertex_input_dynamic_state[] 63ifdef::VK_EXT_extended_dynamic_state2[] 64 * [[VUID-{refpage}-None-04875]] 65 If the bound graphics pipeline state was created with the 66 ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled 67 then flink:vkCmdSetPatchControlPointsEXT must: have been called in the 68 current command buffer prior to this drawing command 69 * [[VUID-{refpage}-None-04879]] 70 If the bound graphics pipeline state was created with the 71 ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT dynamic state 72 enabled then flink:vkCmdSetPrimitiveRestartEnableEXT must: have been 73 called in the current command buffer prior to this drawing command 74endif::VK_EXT_extended_dynamic_state2[] 75ifdef::VK_NV_mesh_shader[] 76 * [[VUID-{refpage}-stage-06481]] 77 The bound graphics pipeline must: not have been created with the 78 slink:VkPipelineShaderStageCreateInfo::pname:stage member of an element 79 of slink:VkGraphicsPipelineCreateInfo::pname:pStages set to 80 ename:VK_SHADER_STAGE_TASK_BIT_NV or ename:VK_SHADER_STAGE_MESH_BIT_NV 81endif::VK_NV_mesh_shader[] 82// Common Valid Usage 83