C Specification

The VkCoarseSampleOrderCustomNV structure is used with a coverage sample ordering type of VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV to specify the order of coverage samples for one combination of fragment width, fragment height, and coverage sample count. The structure is defined as:

typedef struct VkCoarseSampleOrderCustomNV {
    VkShadingRatePaletteEntryNV        shadingRate;
    uint32_t                           sampleCount;
    uint32_t                           sampleLocationCount;
    const VkCoarseSampleLocationNV*    pSampleLocations;
} VkCoarseSampleOrderCustomNV;

Members

  • shadingRate is a shading rate palette entry that identifies the fragment width and height for the combination of fragment area and per-pixel coverage sample count to control.

  • sampleCount identifies the per-pixel coverage sample count for the combination of fragment area and coverage sample count to control.

  • sampleLocationCount specifies the number of sample locations in the custom ordering.

  • pSampleLocations is a pointer to an array of VkCoarseSampleOrderCustomNV structures specifying the location of each sample in the custom ordering.

Description

When using a custom sample ordering, element i in pSampleLocations specifies a specific pixel and per-pixel coverage sample number that corresponds to the coverage sample numbered i in the multi-pixel fragment.

Valid Usage
  • shadingRate must be a shading rate that generates fragments with more than one pixel.

  • sampleCount must correspond to a sample count enumerated in VkSampleCountFlags whose corresponding bit is set in VkPhysicalDeviceLimits::framebufferNoAttachmentsSampleCounts.

  • sampleLocationCount must be equal to the product of sampleCount, the fragment width for shadingRate, and the fragment height for shadingRate.

  • sampleLocationCount must be less than or equal to the value of VkPhysicalDeviceShadingRateImagePropertiesNV::shadingRateMaxCoarseSamples.

  • The array pSampleLocations must contain exactly one entry for every combination of valid values for pixelX, pixelY, and sample in the structure VkCoarseSampleOrderCustomNV.

Valid Usage (Implicit)
  • shadingRate must be a valid VkShadingRatePaletteEntryNV value

  • pSampleLocations must be a valid pointer to an array of sampleLocationCount VkCoarseSampleLocationNV structures

  • sampleLocationCount must be greater than 0

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.