C Specification
The VkPhysicalDeviceFragmentShadingRatePropertiesKHR structure is
defined as:
// Provided by VK_KHR_fragment_shading_rate
typedef struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR {
VkStructureType sType;
void* pNext;
VkExtent2D minFragmentShadingRateAttachmentTexelSize;
VkExtent2D maxFragmentShadingRateAttachmentTexelSize;
uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio;
VkBool32 primitiveFragmentShadingRateWithMultipleViewports;
VkBool32 layeredShadingRateAttachments;
VkBool32 fragmentShadingRateNonTrivialCombinerOps;
VkExtent2D maxFragmentSize;
uint32_t maxFragmentSizeAspectRatio;
uint32_t maxFragmentShadingRateCoverageSamples;
VkSampleCountFlagBits maxFragmentShadingRateRasterizationSamples;
VkBool32 fragmentShadingRateWithShaderDepthStencilWrites;
VkBool32 fragmentShadingRateWithSampleMask;
VkBool32 fragmentShadingRateWithShaderSampleMask;
VkBool32 fragmentShadingRateWithConservativeRasterization;
VkBool32 fragmentShadingRateWithFragmentShaderInterlock;
VkBool32 fragmentShadingRateWithCustomSampleLocations;
VkBool32 fragmentShadingRateStrictMultiplyCombiner;
} VkPhysicalDeviceFragmentShadingRatePropertiesKHR;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
minFragmentShadingRateAttachmentTexelSizeindicates minimum supported width and height of the portion of the framebuffer corresponding to each texel in a fragment shading rate attachment. Each value must be less than or equal to the values inmaxFragmentShadingRateAttachmentTexelSize. Each value must be a power-of-two. It must be (0,0) if theattachmentFragmentShadingRatefeature is not supported. -
maxFragmentShadingRateAttachmentTexelSizeindicates maximum supported width and height of the portion of the framebuffer corresponding to each texel in a fragment shading rate attachment. Each value must be greater than or equal to the values inminFragmentShadingRateAttachmentTexelSize. Each value must be a power-of-two. It must be (0,0) if theattachmentFragmentShadingRatefeature is not supported. -
maxFragmentShadingRateAttachmentTexelSizeAspectRatioindicates the maximum ratio between the width and height of the portion of the framebuffer corresponding to each texel in a fragment shading rate attachment.maxFragmentShadingRateAttachmentTexelSizeAspectRatiomust be a power-of-two value, and must be less than or equal to max(maxFragmentShadingRateAttachmentTexelSize.width/minFragmentShadingRateAttachmentTexelSize.height,maxFragmentShadingRateAttachmentTexelSize.height/minFragmentShadingRateAttachmentTexelSize.width). It must be 0 if theattachmentFragmentShadingRatefeature is not supported. -
primitiveFragmentShadingRateWithMultipleViewportsspecifies whether the primitive fragment shading rate can be used when multiple viewports are used. If this value isVK_FALSE, only a single viewport must be used, and applications must not write to theViewportMaskNVorViewportIndexbuilt-in when settingPrimitiveShadingRateKHR. It must beVK_FALSEif theshaderOutputViewportIndexfeature, theVK_EXT_shader_viewport_index_layerextension, or thegeometryShaderfeature is not supported, or if theprimitiveFragmentShadingRatefeature is not supported. -
layeredShadingRateAttachmentsspecifies whether a shading rate attachment image view can be created with multiple layers. If this value isVK_FALSE, when creating an image view with ausagethat includesVK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,layerCountmust be1. It must beVK_FALSEif themultiviewfeature, theshaderOutputViewportIndexfeature, theVK_EXT_shader_viewport_index_layerextension, or thegeometryShaderfeature is not supported, or if theattachmentFragmentShadingRatefeature is not supported. -
fragmentShadingRateNonTrivialCombinerOpsspecifies whether VkFragmentShadingRateCombinerOpKHR enums other thanVK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHRorVK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHRcan be used. It must beVK_FALSEunless either theprimitiveFragmentShadingRateorattachmentFragmentShadingRatefeature is supported. -
maxFragmentSizeindicates the maximum supported width and height of a fragment. Itswidthandheightmembers must both be power-of-two values. This limit is purely informational, and is not validated. -
maxFragmentSizeAspectRatioindicates the maximum ratio between the width and height of a fragment.maxFragmentSizeAspectRatiomust be a power-of-two value, and must be less than or equal to the maximum of thewidthandheightmembers ofmaxFragmentSize. This limit is purely informational, and is not validated. -
maxFragmentShadingRateCoverageSamplesspecifies the maximum number of coverage samples supported in a single fragment.maxFragmentShadingRateCoverageSamplesmust be less than or equal to the product of thewidthandheightmembers ofmaxFragmentSize, and the sample count reported bymaxFragmentShadingRateRasterizationSamples.maxFragmentShadingRateCoverageSamplesmust be less than or equal tomaxSampleMaskWords× 32 iffragmentShadingRateWithShaderSampleMaskis supported. This limit is purely informational, and is not validated. -
maxFragmentShadingRateRasterizationSamplesis a VkSampleCountFlagBits value specifying the maximum sample rate supported when a fragment covers multiple pixels. This limit is purely informational, and is not validated. -
fragmentShadingRateWithShaderDepthStencilWritesspecifies whether the implementation supports writingFragDepthorFragStencilRefEXTfrom a fragment shader for multi-pixel fragments. If this value isVK_FALSE, writing to those built-ins will clamp the fragment shading rate to (1,1). -
fragmentShadingRateWithSampleMaskspecifies whether the implementation supports setting valid bits of VkPipelineMultisampleStateCreateInfo::pSampleMaskto0for multi-pixel fragments. If this value isVK_FALSE, zeroing valid bits in the sample mask will clamp the fragment shading rate to (1,1). -
fragmentShadingRateWithShaderSampleMaskspecifies whether the implementation supports reading or writingSampleMaskfor multi-pixel fragments. If this value isVK_FALSE, using that built-in will clamp the fragment shading rate to (1,1). -
fragmentShadingRateWithConservativeRasterizationspecifies whether conservative rasterization is supported for multi-pixel fragments. It must beVK_FALSEifVK_EXT_conservative_rasterizationis not supported. If this value isVK_FALSE, using conservative rasterization will clamp the fragment shading rate to (1,1). -
fragmentShadingRateWithFragmentShaderInterlockspecifies whether fragment shader interlock is supported for multi-pixel fragments. It must beVK_FALSEifVK_EXT_fragment_shader_interlockis not supported. If this value isVK_FALSE, using fragment shader interlock will clamp the fragment shading rate to (1,1). -
fragmentShadingRateWithCustomSampleLocationsspecifies whether custom sample locations are supported for multi-pixel fragments. It must beVK_FALSEifVK_EXT_sample_locationsis not supported. If this value isVK_FALSE, using custom sample locations will clamp the fragment shading rate to (1,1). -
fragmentShadingRateStrictMultiplyCombinerspecifies whetherVK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHRaccurately performs a multiplication or not. Implementations where this value isVK_FALSEwill instead combine rates with an addition. IffragmentShadingRateNonTrivialCombinerOpsisVK_FALSE, implementations must report this asVK_FALSE. IffragmentShadingRateNonTrivialCombinerOpsisVK_TRUE, implementations should report this asVK_TRUE.
Description
|
Note
Multiplication of the combiner rates using the fragment width/height in
linear space is equivalent to an addition of those values in log2 space.
Some implementations inadvertently implemented an addition in linear space
due to unclear requirements originating outside of this specification.
This resulted in |
If the VkPhysicalDeviceFragmentShadingRatePropertiesKHR structure is included in the pNext chain of the
VkPhysicalDeviceProperties2 structure passed to
vkGetPhysicalDeviceProperties2, it is filled in with each
corresponding implementation-dependent property.
These properties are related to fragment shading rates.
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.