1// Copyright 2019-2024 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, pname: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_VERSION_1_3,VK_EXT_extended_dynamic_state[] 21 * [[VUID-{refpage}-None-07842]] 22 If 23ifdef::VK_EXT_shader_object[] 24 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 25 stage 26ifdef::VK_EXT_vertex_input_dynamic_state[or] 27endif::VK_EXT_shader_object[] 28ifdef::VK_EXT_vertex_input_dynamic_state[] 29 the bound graphics pipeline state was created with the 30 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled 31endif::VK_EXT_vertex_input_dynamic_state[] 32 then flink:vkCmdSetPrimitiveTopology must: have been called in the 33 current command buffer prior to this drawing command 34 * [[VUID-{refpage}-dynamicPrimitiveTopologyUnrestricted-07500]] 35 If the bound graphics pipeline state was created with the 36 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state enabled 37ifdef::VK_EXT_extended_dynamic_state3[] 38 and the <<limits-dynamicPrimitiveTopologyUnrestricted, 39 pname:dynamicPrimitiveTopologyUnrestricted>> is ename:VK_FALSE, 40endif::VK_EXT_extended_dynamic_state3[] 41 then the pname:primitiveTopology parameter of 42 fname:vkCmdSetPrimitiveTopology must: be of the same 43 <<drawing-primitive-topology-class, topology class>> as the pipeline 44 slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology state 45ifdef::VK_EXT_vertex_input_dynamic_state[] 46 * [[VUID-{refpage}-None-04912]] 47 If the bound graphics pipeline was created with both the 48 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT and 49 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic states 50 enabled, then flink:vkCmdSetVertexInputEXT must: have been called in the 51 current command buffer prior to this draw command 52endif::VK_EXT_vertex_input_dynamic_state[] 53 * [[VUID-{refpage}-pStrides-04913]] 54 If the bound graphics pipeline was created with the 55 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic state 56 enabled, 57ifdef::VK_EXT_vertex_input_dynamic_state[] 58 but without the ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state 59 enabled, 60endif::VK_EXT_vertex_input_dynamic_state[] 61 then flink:vkCmdBindVertexBuffers2EXT must: have been called in the 62 current command buffer prior to this draw command, and the 63 pname:pStrides parameter of flink:vkCmdBindVertexBuffers2EXT must: not 64 be `NULL` 65endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 66ifdef::VK_EXT_vertex_input_dynamic_state,VK_EXT_shader_object[] 67 * [[VUID-{refpage}-None-04914]] 68 If 69ifdef::VK_EXT_shader_object[] 70 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 71 stage 72ifdef::VK_EXT_vertex_input_dynamic_state[or] 73endif::VK_EXT_shader_object[] 74ifdef::VK_EXT_vertex_input_dynamic_state[] 75 the bound graphics pipeline state was created with the 76 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled 77endif::VK_EXT_vertex_input_dynamic_state[] 78 then flink:vkCmdSetVertexInputEXT must: have been called in the current 79 command buffer prior to this draw command 80 * [[VUID-{refpage}-Input-07939]] 81 If 82ifdef::VK_EXT_shader_object[] 83 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 84 stage 85ifdef::VK_EXT_vertex_input_dynamic_state[or] 86endif::VK_EXT_shader_object[] 87ifdef::VK_EXT_vertex_input_dynamic_state[] 88 the bound graphics pipeline state was created with the 89 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled 90endif::VK_EXT_vertex_input_dynamic_state[] 91 then all variables with the code:Input storage class decorated with 92 code:Location in the code:Vertex {ExecutionModel} code:OpEntryPoint 93 must: contain a location in 94 slink:VkVertexInputAttributeDescription2EXT::pname:location 95 * [[VUID-{refpage}-Input-08734]] 96 If 97ifdef::VK_EXT_shader_object[] 98 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 99 stage 100ifdef::VK_EXT_vertex_input_dynamic_state[or] 101endif::VK_EXT_shader_object[] 102ifdef::VK_EXT_vertex_input_dynamic_state[] 103 the bound graphics pipeline state was created with the 104 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled 105endif::VK_EXT_vertex_input_dynamic_state[] 106 then the numeric type associated with all code:Input variables of the 107 corresponding code:Location in the code:Vertex {ExecutionModel} 108 code:OpEntryPoint must: be the same as 109 slink:VkVertexInputAttributeDescription2EXT::pname:format 110 * [[VUID-{refpage}-format-08936]] 111 If 112ifdef::VK_EXT_shader_object[] 113 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 114 stage 115ifdef::VK_EXT_vertex_input_dynamic_state[or] 116endif::VK_EXT_shader_object[] 117ifdef::VK_EXT_vertex_input_dynamic_state[] 118 the bound graphics pipeline state was created with the 119 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled 120endif::VK_EXT_vertex_input_dynamic_state[] 121 and slink:VkVertexInputAttributeDescription2EXT::pname:format has a 122 64-bit component, then the scalar width associated with all code:Input 123 variables of the corresponding code:Location in the code:Vertex 124 {ExecutionModel} code:OpEntryPoint must: be 64-bit 125 * [[VUID-{refpage}-format-08937]] 126 If 127ifdef::VK_EXT_shader_object[] 128 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 129 stage 130ifdef::VK_EXT_vertex_input_dynamic_state[or] 131endif::VK_EXT_shader_object[] 132ifdef::VK_EXT_vertex_input_dynamic_state[] 133 the bound graphics pipeline state was created with the 134 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled 135endif::VK_EXT_vertex_input_dynamic_state[] 136 and the scalar width associated with a code:Location decorated 137 code:Input variable in the code:Vertex {ExecutionModel} 138 code:OpEntryPoint is 64-bit, then the corresponding 139 slink:VkVertexInputAttributeDescription2EXT::pname:format must: have a 140 64-bit component 141 * [[VUID-{refpage}-None-09203]] 142 If 143ifdef::VK_EXT_shader_object[] 144 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 145 stage 146ifdef::VK_EXT_vertex_input_dynamic_state[or] 147endif::VK_EXT_shader_object[] 148ifdef::VK_EXT_vertex_input_dynamic_state[] 149 the bound graphics pipeline state was created with the 150 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled 151endif::VK_EXT_vertex_input_dynamic_state[] 152 and slink:VkVertexInputAttributeDescription2EXT::pname:format has a 153 64-bit component, then all code:Input variables at the corresponding 154 code:Location in the code:Vertex {ExecutionModel} code:OpEntryPoint 155 must: not use components that are not present in the format 156endif::VK_EXT_vertex_input_dynamic_state,VK_EXT_shader_object[] 157ifdef::VK_EXT_extended_dynamic_state2[] 158 * [[VUID-{refpage}-None-04875]] 159 If 160ifdef::VK_EXT_shader_object[] 161 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 162 stage and the most recent call to fname:vkCmdSetPrimitiveTopology in the 163 current command buffer set pname:primitiveTopology to 164 ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, 165ifdef::VK_EXT_extended_dynamic_state2[or] 166endif::VK_EXT_shader_object[] 167ifdef::VK_EXT_extended_dynamic_state2[] 168 the bound graphics pipeline state was created with the 169 ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled 170endif::VK_EXT_extended_dynamic_state2[] 171 then flink:vkCmdSetPatchControlPointsEXT must: have been called in the 172 current command buffer prior to this drawing command 173endif::VK_EXT_extended_dynamic_state2[] 174ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2,VK_EXT_shader_object[] 175 * [[VUID-{refpage}-None-04879]] 176 If 177ifdef::VK_EXT_shader_object[] 178 there is a shader object bound to the ename:VK_SHADER_STAGE_VERTEX_BIT 179 stage 180ifdef::VK_EXT_extended_dynamic_state2[or] 181endif::VK_EXT_shader_object[] 182ifdef::VK_EXT_extended_dynamic_state2[] 183 the bound graphics pipeline state was created with the 184 ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled 185endif::VK_EXT_extended_dynamic_state2[] 186 then flink:vkCmdSetPrimitiveRestartEnable must: have been called in the 187 current command buffer prior to this drawing command 188endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2,VK_EXT_shader_object[] 189ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 190 * [[VUID-{refpage}-stage-06481]] 191 The bound graphics pipeline must: not have been created with the 192 slink:VkPipelineShaderStageCreateInfo::pname:stage member of an element 193 of slink:VkGraphicsPipelineCreateInfo::pname:pStages set to 194 ename:VK_SHADER_STAGE_TASK_BIT_EXT or ename:VK_SHADER_STAGE_MESH_BIT_EXT 195ifdef::VK_EXT_shader_object[] 196 * [[VUID-{refpage}-None-08885]] 197 There must: be no shader object bound to either of the 198 ename:VK_SHADER_STAGE_TASK_BIT_EXT or ename:VK_SHADER_STAGE_MESH_BIT_EXT 199 stages 200endif::VK_EXT_shader_object[] 201endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 202// Common Valid Usage 203