Structures

VkRenderingFragmentShadingRateAttachmentInfoKHR

Structure specifying fragment shading rate attachment information

The VkRenderingFragmentShadingRateAttachmentInfoKHR structure is defined as:

typedef struct VkRenderingFragmentShadingRateAttachmentInfoKHR {
    VkStructureType sType;
    const void* pNext;
    VkImageView imageView;
    VkImageLayout imageLayout;
    VkExtent2D shadingRateAttachmentTexelSize;
} VkRenderingFragmentShadingRateAttachmentInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • imageView is the image view that will be used as a fragment shading rate attachment.
  • imageLayout is the layout that imageView will be in during rendering.
  • shadingRateAttachmentTexelSize specifies the number of pixels corresponding to each texel in imageView.

This structure can be included in the pNext chain of VkRenderingInfo to define a fragment shading rate attachment. If imageView is VK_NULL_HANDLE, or if this structure is not specified, the implementation behaves as if a valid shading rate attachment was specified with all texels specifying a single pixel per fragment.

Valid Usage

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06147

If imageView is not VK_NULL_HANDLE, layout must be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06148

If imageView is not VK_NULL_HANDLE, it must have been created with VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06149

If imageView is not VK_NULL_HANDLE, shadingRateAttachmentTexelSize.width must be a power of two value

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06150

If imageView is not VK_NULL_HANDLE, shadingRateAttachmentTexelSize.width must be less than or equal to maxFragmentShadingRateAttachmentTexelSize.width

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06151

If imageView is not VK_NULL_HANDLE, shadingRateAttachmentTexelSize.width must be greater than or equal to minFragmentShadingRateAttachmentTexelSize.width

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06152

If imageView is not VK_NULL_HANDLE, shadingRateAttachmentTexelSize.height must be a power of two value

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06153

If imageView is not VK_NULL_HANDLE, shadingRateAttachmentTexelSize.height must be less than or equal to maxFragmentShadingRateAttachmentTexelSize.height

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06154

If imageView is not VK_NULL_HANDLE, shadingRateAttachmentTexelSize.height must be greater than or equal to minFragmentShadingRateAttachmentTexelSize.height

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06155

If imageView is not VK_NULL_HANDLE, the quotient of shadingRateAttachmentTexelSize.width and shadingRateAttachmentTexelSize.height must be less than or equal to maxFragmentShadingRateAttachmentTexelSizeAspectRatio

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageView-06156

If imageView is not VK_NULL_HANDLE, the quotient of shadingRateAttachmentTexelSize.height and shadingRateAttachmentTexelSize.width must be less than or equal to maxFragmentShadingRateAttachmentTexelSizeAspectRatio

Valid Usage (Implicit)

VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR