Function Prototype

vkCmdSetLineStippleKHR

Set line stipple dynamically for a command buffer
primary / secondary
both
graphics
state

To dynamically set the line stipple state, call:

void vkCmdSetLineStippleKHR(
    VkCommandBuffer commandBuffer,
    uint32_t lineStippleFactor,
    uint16_t lineStipplePattern);

or the equivalent command

void vkCmdSetLineStippleEXT(
    VkCommandBuffer commandBuffer,
    uint32_t lineStippleFactor,
    uint16_t lineStipplePattern);
  • commandBuffer is the command buffer into which the command will be recorded.
  • lineStippleFactor is the repeat factor used in stippled line rasterization.
  • lineStipplePattern is the bit pattern used in stippled line rasterization.

This command sets the line stipple state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_LINE_STIPPLE_EXT set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineRasterizationLineStateCreateInfoKHR::lineStippleFactor and VkPipelineRasterizationLineStateCreateInfoKHR::lineStipplePattern values used to create the currently active pipeline.

Valid Usage

VUID-vkCmdSetLineStippleKHR-lineStippleFactor-02776

lineStippleFactor must be in the range [1,256]

Valid Usage (Implicit)

VUID-vkCmdSetLineStippleKHR-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support graphics operations

VUID-vkCmdSetLineStippleKHR-videocoding

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 ::