Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTVertexInputDynamicState

extends Object
Class Inheritance
Imports
javax.annotation.*, org.lwjgl.system.*

One of the states that contributes to the combinatorial explosion of pipeline state objects that need to be created, is the vertex input binding and attribute descriptions. By allowing them to be dynamic applications may reduce the number of pipeline objects they need to create.

This extension adds dynamic state support for what is normally static state in VkPipelineVertexInputStateCreateInfo.

VK_EXT_vertex_input_dynamic_state
Name String
VK_EXT_vertex_input_dynamic_state
Extension Type
Device extension
Registered Extension Number
353
Revision
2
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Version 1.1
Contact
Other Extension Metadata
Last Modified Date
2020-08-21
IP Status
No known IP claims.
Contributors
  • Jeff Bolz, NVIDIA
  • Spencer Fricke, Samsung
  • Stu Smith, AMD

Field Summary

Modifier and TypeField and Description
public static final int
VK_DYNAMIC_STATE_VERTEX_INPUT_EXT

Extends VkDynamicState.

public static final String
public static final int
VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION

The extension specification version.

public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, int
the number of vertex binding descriptions provided in pVertexBindingDescriptions.
vertexBindingDescriptionCount
,
long pVertexBindingDescriptions, int
the number of vertex attribute descriptions provided in pVertexAttributeDescriptions.
vertexAttributeDescriptionCount
,
long pVertexAttributeDescriptions)

Unsafe version of: CmdSetVertexInputEXT

public static void
vkCmdSetVertexInputEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
VkVertexInputBindingDescription2EXT.Buffer
a pointer to an array of VkVertexInputBindingDescription2EXT structures.
pVertexBindingDescriptions
,
VkVertexInputAttributeDescription2EXT.Buffer
a pointer to an array of VkVertexInputAttributeDescription2EXT structures.
pVertexAttributeDescriptions
)

Set the vertex input state dynamically for a command buffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_DYNAMIC_STATE_VERTEX_INPUT_EXTback to summary
public static final int VK_DYNAMIC_STATE_VERTEX_INPUT_EXT

Extends VkDynamicState.

VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAMEback to summary
public static final String VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME

The extension name.

VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSIONback to summary
public static final int VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXTback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXTback to summary
public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXTback to summary
public static final int VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT

Extends VkStructureType.

Enum values:

Constructor Detail

EXTVertexInputDynamicStateback to summary
protected EXTVertexInputDynamicState()

Method Detail

nvkCmdSetVertexInputEXTback to summary
public static void nvkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, int vertexBindingDescriptionCount, long pVertexBindingDescriptions, int vertexAttributeDescriptionCount, long pVertexAttributeDescriptions)

Unsafe version of: CmdSetVertexInputEXT

Parameters
vertexBindingDescriptionCount:int

the number of vertex binding descriptions provided in pVertexBindingDescriptions.

vertexAttributeDescriptionCount:int

the number of vertex attribute descriptions provided in pVertexAttributeDescriptions.

vkCmdSetVertexInputEXTback to summary
public static void vkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, VkVertexInputBindingDescription2EXT.Buffer pVertexBindingDescriptions, VkVertexInputAttributeDescription2EXT.Buffer pVertexAttributeDescriptions)

Set the vertex input state dynamically for a command buffer.

C Specification

To dynamically set the vertex input attribute and vertex input binding descriptions, call:


void vkCmdSetVertexInputEXT(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    vertexBindingDescriptionCount,
    const VkVertexInputBindingDescription2EXT*  pVertexBindingDescriptions,
    uint32_t                                    vertexAttributeDescriptionCount,
    const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions);
Description

This command sets the vertex input attribute and vertex input binding descriptions state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_VERTEX_INPUT_EXT set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkGraphicsPipelineCreateInfo::pVertexInputState values used to create the currently active pipeline.

If drawing using shader objects, or if the bound pipeline state object was also created with the DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, then CmdBindVertexBuffers2 can be used instead of vkCmdSetVertexInputEXT to dynamically set the stride.

Valid Usage
  • Either the vertexInputDynamicState feature or the shaderObject feature or both must be enabled
  • vertexBindingDescriptionCount must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings
  • vertexAttributeDescriptionCount must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputAttributes
  • For every binding specified by each element of pVertexAttributeDescriptions, a VkVertexInputBindingDescription2EXT must exist in pVertexBindingDescriptions with the same value of binding
  • All elements of pVertexBindingDescriptions must describe distinct binding numbers
  • All elements of pVertexAttributeDescriptions must describe distinct attribute locations
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • If vertexBindingDescriptionCount is not 0, pVertexBindingDescriptions must be a valid pointer to an array of vertexBindingDescriptionCount valid VkVertexInputBindingDescription2EXT structures
  • If vertexAttributeDescriptionCount is not 0, pVertexAttributeDescriptions must be a valid pointer to an array of vertexAttributeDescriptionCount valid VkVertexInputAttributeDescription2EXT structures
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a video coding scope
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBothOutsideGraphicsState
See Also

VkVertexInputAttributeDescription2EXT, VkVertexInputBindingDescription2EXT

Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

pVertexBindingDescriptions:VkVertexInputBindingDescription2EXT.Buffer

a pointer to an array of VkVertexInputBindingDescription2EXT structures.

pVertexAttributeDescriptions:VkVertexInputAttributeDescription2EXT.Buffer

a pointer to an array of VkVertexInputAttributeDescription2EXT structures.