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