Function Prototype
vkCmdSetPrimitiveRestartIndexEXT
Set primitive assembly restart index dynamically for a command buffer
To dynamically control which special vertex index value is treated as restarting the assembly of primitives, call:
void vkCmdSetPrimitiveRestartIndexEXT(
VkCommandBuffer commandBuffer,
uint32_t primitiveRestartIndex);
pub fn cmd_set_primitive_restart_index_ext(
command_buffer: vk::CommandBuffer,
primitive_restart_index: u32,
);
commandBufferis the command buffer into which the command will be recorded.primitiveRestartIndexcontrols which special vertex index value is treated as restarting the assembly of primitives. This overrides the default values specified in VkPipelineInputAssemblyStateCreateInfo::primitiveRestartEnable.
This command sets a custom primitive restart index for subsequent drawing commands. Binding an index buffer invalidates the custom index value.
Valid Usage
VUID-vkCmdSetPrimitiveRestartIndexEXT-primitiveRestartIndex-12395
The primitiveRestartIndex
feature must be enabled
Valid Usage (Implicit)
VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_GRAPHICS_BIT operations
VUID-vkCmdSetPrimitiveRestartIndexEXT-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Type
Function Prototype
Command Buffer Level
primarysecondary
Queue Types
VK_QUEUE_GRAPHICS_BIT
Command Type
state