Function Prototype

vkCmdSetCoarseSampleOrderNV

Set order of coverage samples for coarse fragments dynamically for a command buffer
primary / secondary
both
graphics
state

To dynamically set the order of coverage samples in fragments larger than one pixel, call:

void vkCmdSetCoarseSampleOrderNV(
    VkCommandBuffer commandBuffer,
    VkCoarseSampleOrderTypeNV sampleOrderType,
    uint32_t customSampleOrderCount,
    const VkCoarseSampleOrderCustomNV* pCustomSampleOrders);
  • commandBuffer is the command buffer into which the command will be recorded.
  • sampleOrderType specifies the mechanism used to order coverage samples in fragments larger than one pixel.
  • customSampleOrderCount specifies the number of custom sample orderings to use when ordering coverage samples.
  • pCustomSampleOrders is a pointer to an array of VkCoarseSampleOrderCustomNV structures, each structure specifying the coverage sample order for a single combination of fragment area and coverage sample count.

If sampleOrderType is VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, the coverage sample order used for any combination of fragment area and coverage sample count not enumerated in pCustomSampleOrders will be identical to that used for VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV.

This command sets the order of coverage samples for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineViewportCoarseSampleOrderStateCreateInfoNV values used to create the currently active pipeline.

Valid Usage

VUID-vkCmdSetCoarseSampleOrderNV-sampleOrderType-02081

If sampleOrderType is not VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, customSamplerOrderCount must be 0

VUID-vkCmdSetCoarseSampleOrderNV-pCustomSampleOrders-02235

The array pCustomSampleOrders must not contain two structures with matching values for both the shadingRate and sampleCount members

Valid Usage (Implicit)

VUID-vkCmdSetCoarseSampleOrderNV-pCustomSampleOrders-parameter

If customSampleOrderCount is not 0, pCustomSampleOrders must be a valid pointer to an array of customSampleOrderCount valid VkCoarseSampleOrderCustomNV structures

VUID-vkCmdSetCoarseSampleOrderNV-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support graphics operations

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