C Specification
The VkRenderingInfo structure is defined as:
// Provided by VK_VERSION_1_3
typedef struct VkRenderingInfo {
VkStructureType sType;
const void* pNext;
VkRenderingFlags flags;
VkRect2D renderArea;
uint32_t layerCount;
uint32_t viewMask;
uint32_t colorAttachmentCount;
const VkRenderingAttachmentInfo* pColorAttachments;
const VkRenderingAttachmentInfo* pDepthAttachment;
const VkRenderingAttachmentInfo* pStencilAttachment;
} VkRenderingInfo;
or the equivalent
// Provided by VK_KHR_dynamic_rendering
typedef VkRenderingInfo VkRenderingInfoKHR;
Members
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
flagsis a bitmask of VkRenderingFlagBits. -
renderAreais the render area that is affected by the render pass instance. -
layerCountis the number of layers rendered to in each attachment whenviewMaskis0. -
viewMaskis the view mask indicating the indices of attachment layers that will be rendered when it is not0. -
colorAttachmentCountis the number of elements inpColorAttachments. -
pColorAttachmentsis a pointer to an array ofcolorAttachmentCountVkRenderingAttachmentInfo structures describing any color attachments used. -
pDepthAttachmentis a pointer to a VkRenderingAttachmentInfo structure describing a depth attachment. -
pStencilAttachmentis a pointer to a VkRenderingAttachmentInfo structure describing a stencil attachment.
Description
If viewMask is not 0, multiview is enabled.
If there is an instance of VkDeviceGroupRenderPassBeginInfo included
in the pNext chain and its deviceCount member is not 0, then
renderArea is ignored, and the render area is defined per-device by
that structure.
Each element of the pColorAttachments array corresponds to an output
location in the shader, i.e. if the shader declares an output variable
decorated with a Location value of X, then it uses the attachment
provided in pColorAttachments[X].
If the imageView member of any element of pColorAttachments is
VK_NULL_HANDLE, writes to the corresponding location by a fragment are
discarded.
-
VUID-VkRenderingInfo-viewMask-06069
IfviewMaskis0,layerCountmust not be0 -
VUID-VkRenderingInfo-multisampledRenderToSingleSampled-06857
If none of theVK_AMD_mixed_attachment_samplesextension, theVK_NV_framebuffer_mixed_samplesextension, or themultisampledRenderToSingleSampledfeature are enabled,imageViewmembers ofpDepthAttachment,pStencilAttachment, and elements ofpColorAttachmentsthat are not VK_NULL_HANDLE must have been created with the samesampleCount -
VUID-VkRenderingInfo-imageView-06858
If multisampled-render-to-single-sampled is enabled, then all attachments referenced byimageViewmembers ofpDepthAttachment,pStencilAttachment, and elements ofpColorAttachmentsthat are not VK_NULL_HANDLE must have a sample count that is eitherVK_SAMPLE_COUNT_1_BITor equal to VkMultisampledRenderToSingleSampledInfoEXT::rasterizationSamples. -
VUID-VkRenderingInfo-imageView-06859
If multisampled-render-to-single-sampled is enabled, then all attachments referenced byimageViewmembers ofpDepthAttachment,pStencilAttachment, and elements ofpColorAttachmentsthat are not VK_NULL_HANDLE and have a sample count ofVK_SAMPLE_COUNT_1_BITmust have been created withVK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXTin their VkImageCreateInfo::flags. -
VUID-VkRenderingInfo-pNext-06077
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0,renderArea.offset.xmust be greater than or equal to 0 -
VUID-VkRenderingInfo-pNext-06078
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0,renderArea.offset.ymust be greater than or equal to 0 -
VUID-VkRenderingInfo-pNext-06079
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0, the width of theimageViewmember of any element ofpColorAttachments,pDepthAttachment, orpStencilAttachmentthat is not VK_NULL_HANDLE must be greater than or equal torenderArea.offset.x+renderArea.extent.width -
VUID-VkRenderingInfo-pNext-06080
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0, the height of theimageViewmember of any element ofpColorAttachments,pDepthAttachment, orpStencilAttachmentthat is not VK_NULL_HANDLE must be greater than or equal torenderArea.offset.y+renderArea.extent.height -
VUID-VkRenderingInfo-pNext-06083
If thepNextchain contains VkDeviceGroupRenderPassBeginInfo, the width of theimageViewmember of any element ofpColorAttachments,pDepthAttachment, orpStencilAttachmentthat is not VK_NULL_HANDLE must be greater than or equal to the sum of theoffset.xandextent.widthmembers of each element ofpDeviceRenderAreas -
VUID-VkRenderingInfo-pNext-06084
If thepNextchain contains VkDeviceGroupRenderPassBeginInfo, the height of theimageViewmember of any element ofpColorAttachments,pDepthAttachment, orpStencilAttachmentthat is not VK_NULL_HANDLE must be greater than or equal to the sum of theoffset.yandextent.heightmembers of each element ofpDeviceRenderAreas -
VUID-VkRenderingInfo-pDepthAttachment-06085
If neitherpDepthAttachmentorpStencilAttachmentareNULLand theimageViewmember of either structure is not VK_NULL_HANDLE, theimageViewmember of each structure must be the same -
VUID-VkRenderingInfo-pDepthAttachment-06086
If neitherpDepthAttachmentorpStencilAttachmentareNULL, and theresolveModemember of each is notVK_RESOLVE_MODE_NONE, theresolveImageViewmember of each structure must be the same -
VUID-VkRenderingInfo-colorAttachmentCount-06087
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, thatimageViewmust have been created withVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT -
VUID-VkRenderingInfo-pDepthAttachment-06547
IfpDepthAttachmentis notNULLandpDepthAttachment->imageViewis not VK_NULL_HANDLE,pDepthAttachment->imageViewmust have been created with a format that includes a depth aspect -
VUID-VkRenderingInfo-pDepthAttachment-06088
IfpDepthAttachmentis notNULLandpDepthAttachment->imageViewis not VK_NULL_HANDLE,pDepthAttachment->imageViewmust have been created withVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT -
VUID-VkRenderingInfo-pStencilAttachment-06548
IfpStencilAttachmentis notNULLandpStencilAttachment->imageViewis not VK_NULL_HANDLE,pStencilAttachment->imageViewmust have been created with a format that includes a stencil aspect -
VUID-VkRenderingInfo-pStencilAttachment-06089
IfpStencilAttachmentis notNULLandpStencilAttachment->imageViewis not VK_NULL_HANDLE,pStencilAttachment->imageViewmust have been created with a stencil usage includingVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT -
VUID-VkRenderingInfo-colorAttachmentCount-06090
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, thelayoutmember of that element ofpColorAttachmentsmust not beVK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALorVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-colorAttachmentCount-06091
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, if theresolveModemember of that element ofpColorAttachmentsis notVK_RESOLVE_MODE_NONE, itsresolveImageLayoutmember must not beVK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALorVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-pDepthAttachment-06092
IfpDepthAttachmentis notNULLandpDepthAttachment->imageViewis not VK_NULL_HANDLE,pDepthAttachment->layoutmust not beVK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL -
VUID-VkRenderingInfo-pDepthAttachment-06093
IfpDepthAttachmentis notNULL,pDepthAttachment->imageViewis not VK_NULL_HANDLE, andpDepthAttachment->resolveModeis notVK_RESOLVE_MODE_NONE,pDepthAttachment->resolveImageLayoutmust not beVK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL -
VUID-VkRenderingInfo-pStencilAttachment-06094
IfpStencilAttachmentis notNULLandpStencilAttachment->imageViewis not VK_NULL_HANDLE,pStencilAttachment->layoutmust not beVK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL -
VUID-VkRenderingInfo-pStencilAttachment-06095
IfpStencilAttachmentis notNULL,pStencilAttachment->imageViewis not VK_NULL_HANDLE, andpStencilAttachment->resolveModeis notVK_RESOLVE_MODE_NONE,pStencilAttachment->resolveImageLayoutmust not beVK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL -
VUID-VkRenderingInfo-colorAttachmentCount-06096
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, thelayoutmember of that element ofpColorAttachmentsmust not beVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALorVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-colorAttachmentCount-06097
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, if theresolveModemember of that element ofpColorAttachmentsis notVK_RESOLVE_MODE_NONE, itsresolveImageLayoutmember must not beVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALorVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-pDepthAttachment-06098
IfpDepthAttachmentis notNULL,pDepthAttachment->imageViewis not VK_NULL_HANDLE, andpDepthAttachment->resolveModeis notVK_RESOLVE_MODE_NONE,pDepthAttachment->resolveImageLayoutmust not beVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL -
VUID-VkRenderingInfo-pStencilAttachment-06099
IfpStencilAttachmentis notNULL,pStencilAttachment->imageViewis not VK_NULL_HANDLE, andpStencilAttachment->resolveModeis notVK_RESOLVE_MODE_NONE,pStencilAttachment->resolveImageLayoutmust not beVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-colorAttachmentCount-06100
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, thelayoutmember of that element ofpColorAttachmentsmust not beVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, orVK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-colorAttachmentCount-06101
IfcolorAttachmentCountis not0and theimageViewmember of an element ofpColorAttachmentsis not VK_NULL_HANDLE, if theresolveModemember of that element ofpColorAttachmentsis notVK_RESOLVE_MODE_NONE, itsresolveImageLayoutmember must not beVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, orVK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL -
VUID-VkRenderingInfo-pDepthAttachment-06102
IfpDepthAttachmentis notNULLandpDepthAttachment->imageViewis not VK_NULL_HANDLE,pDepthAttachment->resolveModemust be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::supportedDepthResolveModes -
VUID-VkRenderingInfo-pStencilAttachment-06103
IfpStencilAttachmentis notNULLandpStencilAttachment->imageViewis not VK_NULL_HANDLE,pStencilAttachment->resolveModemust be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::supportedStencilResolveModes -
VUID-VkRenderingInfo-pDepthAttachment-06104
IfpDepthAttachmentorpStencilAttachmentare both notNULL,pDepthAttachment->imageViewandpStencilAttachment->imageVieware both not VK_NULL_HANDLE, and VkPhysicalDeviceDepthStencilResolveProperties::independentResolveNoneisVK_FALSE, theresolveModeof both structures must be the same value -
VUID-VkRenderingInfo-pDepthAttachment-06105
IfpDepthAttachmentorpStencilAttachmentare both notNULL,pDepthAttachment->imageViewandpStencilAttachment->imageVieware both not VK_NULL_HANDLE, VkPhysicalDeviceDepthStencilResolveProperties::independentResolveisVK_FALSE, and theresolveModeof neither structure isVK_RESOLVE_MODE_NONE, theresolveModeof both structures must be the same value -
VUID-VkRenderingInfo-colorAttachmentCount-06106
colorAttachmentCountmust be less than or equal to VkPhysicalDeviceLimits::maxColorAttachments -
VUID-VkRenderingInfo-imageView-06107
If theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE, and thefragmentDensityMapNonSubsampledImagesfeature is not enabled, validimageViewandresolveImageViewmembers ofpDepthAttachment,pStencilAttachment, and each element ofpColorAttachmentsmust be a VkImageView created withVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT -
VUID-VkRenderingInfo-imageView-06108
If theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE, andviewMaskis not0,imageViewmust have alayerCountgreater than or equal to the index of the most significant bit inviewMask -
VUID-VkRenderingInfo-imageView-06109
If theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE, andviewMaskis0,imageViewmust have alayerCountequal to1 -
VUID-VkRenderingInfo-pNext-06112
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0 and theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a width greater than or equal to ⌈maxFragmentDensityTexelSizewidthrenderAreax+renderAreawidth⌉ -
VUID-VkRenderingInfo-pNext-06113
If thepNextchain contains a VkDeviceGroupRenderPassBeginInfo structure, itsdeviceRenderAreaCountmember is not 0, and theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a width greater than or equal to ⌈maxFragmentDensityTexelSizewidthpDeviceRenderAreasx+pDeviceRenderAreaswidth⌉ for each element ofpDeviceRenderAreas -
VUID-VkRenderingInfo-pNext-06114
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0 and theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a height greater than or equal to ⌈maxFragmentDensityTexelSizeheightrenderAreay+renderAreaheight⌉ -
VUID-VkRenderingInfo-pNext-06115
If thepNextchain contains a VkDeviceGroupRenderPassBeginInfo structure, itsdeviceRenderAreaCountmember is not 0, and theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a height greater than or equal to ⌈maxFragmentDensityTexelSizeheightpDeviceRenderAreasy+pDeviceRenderAreasheight⌉ for each element ofpDeviceRenderAreas -
VUID-VkRenderingInfo-imageView-06116
If theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain is not VK_NULL_HANDLE, it must not be equal to theimageVieworresolveImageViewmember ofpDepthAttachment,pStencilAttachment, or any element ofpColorAttachments -
VUID-VkRenderingInfo-pNext-06119
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0 and theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a width greater than or equal to ⌈shadingRateAttachmentTexelSizewidthrenderAreax+renderAreawidth⌉ -
VUID-VkRenderingInfo-pNext-06120
If thepNextchain contains a VkDeviceGroupRenderPassBeginInfo structure, itsdeviceRenderAreaCountmember is not 0, and theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a width greater than or equal to ⌈shadingRateAttachmentTexelSizewidthpDeviceRenderAreasx+pDeviceRenderAreaswidth⌉ for each element ofpDeviceRenderAreas -
VUID-VkRenderingInfo-pNext-06121
If thepNextchain does not contain VkDeviceGroupRenderPassBeginInfo or itsdeviceRenderAreaCountmember is equal to 0 and theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a height greater than or equal to ⌈shadingRateAttachmentTexelSizeheightrenderAreay+renderAreaheight⌉ -
VUID-VkRenderingInfo-pNext-06122
If thepNextchain contains a VkDeviceGroupRenderPassBeginInfo structure, itsdeviceRenderAreaCountmember is not 0, and theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE,imageViewmust have a height greater than or equal to ⌈shadingRateAttachmentTexelSizeheightpDeviceRenderAreasy+pDeviceRenderAreasheight⌉ for each element ofpDeviceRenderAreas -
VUID-VkRenderingInfo-imageView-06123
If theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE, andviewMaskis0,imageViewmust have alayerCountthat is either equal to1or greater than or equal tolayerCount -
VUID-VkRenderingInfo-imageView-06124
If theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE, andviewMaskis not0,imageViewmust have alayerCountthat either equal to1or greater than or equal to the index of the most significant bit inviewMask -
VUID-VkRenderingInfo-imageView-06125
If theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE, it must not be equal to theimageVieworresolveImageViewmember ofpDepthAttachment,pStencilAttachment, or any element ofpColorAttachments -
VUID-VkRenderingInfo-imageView-06126
If theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure included in thepNextchain is not VK_NULL_HANDLE, it must not be equal to theimageViewmember of a VkRenderingFragmentDensityMapAttachmentInfoEXT structure included in thepNextchain -
VUID-VkRenderingInfo-multiview-06127
If themultiviewfeature is not enabled,viewMaskmust be0 -
VUID-VkRenderingInfo-viewMask-06128
The index of the most significant bit inviewMaskmust be less thanmaxMultiviewViewCount
-
VUID-VkRenderingInfo-sType-sType
sTypemust beVK_STRUCTURE_TYPE_RENDERING_INFO -
VUID-VkRenderingInfo-pNext-pNext
EachpNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance of VkDeviceGroupRenderPassBeginInfo, VkMultisampledRenderToSingleSampledInfoEXT, VkMultiviewPerViewAttributesInfoNVX, VkRenderingFragmentDensityMapAttachmentInfoEXT, or VkRenderingFragmentShadingRateAttachmentInfoKHR -
VUID-VkRenderingInfo-sType-unique
ThesTypevalue of each struct in thepNextchain must be unique -
VUID-VkRenderingInfo-flags-parameter
flagsmust be a valid combination of VkRenderingFlagBits values -
VUID-VkRenderingInfo-pColorAttachments-parameter
IfcolorAttachmentCountis not0,pColorAttachmentsmust be a valid pointer to an array ofcolorAttachmentCountvalid VkRenderingAttachmentInfo structures -
VUID-VkRenderingInfo-pDepthAttachment-parameter
IfpDepthAttachmentis notNULL,pDepthAttachmentmust be a valid pointer to a valid VkRenderingAttachmentInfo structure -
VUID-VkRenderingInfo-pStencilAttachment-parameter
IfpStencilAttachmentis notNULL,pStencilAttachmentmust be a valid pointer to a valid VkRenderingAttachmentInfo structure
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.