// Copyright 2019-2022 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

// Common Valid Usage
// Common to drawing commands that consume vertex binding state
  * [[VUID-{refpage}-None-04007]]
    All vertex input bindings accessed via vertex input variables declared
    in the vertex shader entry point's interface must: have either valid or
    dlink:VK_NULL_HANDLE buffers bound
  * [[VUID-{refpage}-None-04008]]
    If the <<features-nullDescriptor, pname:nullDescriptor>> feature is not
    enabled, all vertex input bindings accessed via vertex input variables
    declared in the vertex shader entry point's interface must: not be
    dlink:VK_NULL_HANDLE
  * [[VUID-{refpage}-None-02721]]
    For a given vertex buffer binding, any attribute data fetched must: be
    entirely contained within the corresponding vertex buffer binding, as
    described in <<fxvertex-input>>
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
ifndef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-{refpage}-primitiveTopology-03420]]
    If the bound graphics pipeline state was created with the
    ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT dynamic state enabled then
    flink:vkCmdSetPrimitiveTopology must: have been called in the current
    command buffer prior to this drawing command, and the
    pname:primitiveTopology parameter of fname:vkCmdSetPrimitiveTopology
    must: be of the same <<drawing-primitive-topology-class, topology
    class>> as the pipeline
    slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology state
endif::VK_EXT_extended_dynamic_state3[]
ifdef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-{refpage}-dynamicPrimitiveTopologyUnrestricted-07500]]
    If the bound graphics pipeline state was created with the
    ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT dynamic state enabled and
    the <<limits-dynamicPrimitiveTopologyUnrestricted,
    pname:dynamicPrimitiveTopologyUnrestricted>> is ename:VK_FALSE, then the
    pname:primitiveTopology parameter in the last call to
    flink:vkCmdSetPrimitiveTopology must: be of the same
    <<drawing-primitive-topology-class, topology class>> as the pipeline
    slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology state
endif::VK_EXT_extended_dynamic_state3[]
ifdef::VK_EXT_vertex_input_dynamic_state[]
  * [[VUID-{refpage}-None-04912]]
    If the bound graphics pipeline was created with both the
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT and
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic states
    enabled, then flink:vkCmdSetVertexInputEXT must: have been called in the
    current command buffer prior to this draw command
  * [[VUID-{refpage}-pStrides-04913]]
    If the bound graphics pipeline was created with the
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic state
    enabled, but not the ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic
    state enabled, then flink:vkCmdBindVertexBuffers2EXT must: have been
    called in the current command buffer prior to this draw command, and the
    pname:pStrides parameter of flink:vkCmdBindVertexBuffers2EXT must: not
    be `NULL`
endif::VK_EXT_vertex_input_dynamic_state[]
ifndef::VK_EXT_vertex_input_dynamic_state[]
  * [[VUID-{refpage}-pStrides-04884]]
    If the bound graphics pipeline was created with the
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT dynamic state
    enabled, then flink:vkCmdBindVertexBuffers2EXT must: have been called in
    the current command buffer prior to this drawing command, and the
    pname:pStrides parameter of flink:vkCmdBindVertexBuffers2EXT must: not
    be `NULL`
endif::VK_EXT_vertex_input_dynamic_state[]
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
ifdef::VK_EXT_vertex_input_dynamic_state[]
  * [[VUID-{refpage}-None-04914]]
    If the bound graphics pipeline state was created with the
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state enabled, then
    flink:vkCmdSetVertexInputEXT must: have been called in the current
    command buffer prior to this draw command
endif::VK_EXT_vertex_input_dynamic_state[]
ifdef::VK_EXT_extended_dynamic_state2[]
  * [[VUID-{refpage}-None-04875]]
    If the bound graphics pipeline state was created with the
    ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled
    then flink:vkCmdSetPatchControlPointsEXT must: have been called in the
    current command buffer prior to this drawing command
endif::VK_EXT_extended_dynamic_state2[]
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
  * [[VUID-{refpage}-None-04879]]
    If the bound graphics pipeline state was created with the
    ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE dynamic state enabled
    then flink:vkCmdSetPrimitiveRestartEnable must: have been called in the
    current command buffer prior to this drawing command
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-{refpage}-stage-06481]]
    The bound graphics pipeline must: not have been created with the
    slink:VkPipelineShaderStageCreateInfo::pname:stage member of an element
    of slink:VkGraphicsPipelineCreateInfo::pname:pStages set to
    ename:VK_SHADER_STAGE_TASK_BIT_EXT or ename:VK_SHADER_STAGE_MESH_BIT_EXT
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
// Common Valid Usage
