C Specification

If a pipeline state object is created with VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV enabled, the order of coverage samples in fragments larger than one pixel is set by the command:

void vkCmdSetCoarseSampleOrderNV(
    VkCommandBuffer                             commandBuffer,
    VkCoarseSampleOrderTypeNV                   sampleOrderType,
    uint32_t                                    customSampleOrderCount,
    const VkCoarseSampleOrderCustomNV*          pCustomSampleOrders);

Parameters

  • 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 of which specifies the coverage sample order for a single combination of fragment area and coverage sample count.

Description

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.

Valid Usage
  • If sampleOrderType is not VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, customSamplerOrderCount must be 0

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

Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle

  • sampleOrderType must be a valid VkCoarseSampleOrderTypeNV value

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

  • commandBuffer must be in the recording state

  • The VkCommandPool that commandBuffer was allocated from must support graphics operations

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 Levels Render Pass Scope Supported Queue Types Pipeline Type

Primary
Secondary

Both

Graphics

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.