C Specification
The VkFramebufferCreateInfo structure is defined as:
| Warning | This functionality is deprecated by Vulkan Version 1.4. See Deprecated Functionality for more information. | 
// Provided by VK_VERSION_1_0
typedef struct VkFramebufferCreateInfo {
    VkStructureType             sType;
    const void*                 pNext;
    VkFramebufferCreateFlags    flags;
    VkRenderPass                renderPass;
    uint32_t                    attachmentCount;
    const VkImageView*          pAttachments;
    uint32_t                    width;
    uint32_t                    height;
    uint32_t                    layers;
} VkFramebufferCreateInfo;Members
- 
sTypeis a VkStructureType value identifying this structure.
- 
pNextisNULLor a pointer to a structure extending this structure.
- 
flagsis a bitmask of VkFramebufferCreateFlagBits
- 
renderPassis a render pass defining what render passes the framebuffer will be compatible with. See Render Pass Compatibility for details. The implementation must not access this object outside of the duration of the command this structure is passed to.
- 
attachmentCountis the number of attachments.
- 
pAttachmentsis a pointer to an array of VkImageView handles, each of which will be used as the corresponding attachment in a render pass instance. IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, this parameter is ignored.
- 
width,heightandlayersdefine the dimensions of the framebuffer. If the render pass uses multiview, thenlayersmust be one and each attachment requires a number of layers that is greater than the maximum bit index set in the view mask in the subpasses in which it is used.
Description
It is legal for a subpass to use no color or depth/stencil attachments,
either because it has no attachment references or because all of them are
VK_ATTACHMENT_UNUSED.
This kind of subpass can use shader side effects such as image stores and
atomics to produce an output.
In this case, the subpass continues to use the width, height,
and layers of the framebuffer to define the dimensions of the
rendering area, and the rasterizationSamples from each pipeline’s
VkPipelineMultisampleStateCreateInfo to define the number of samples
used in rasterization; however, if
VkPhysicalDeviceFeatures::variableMultisampleRate is
VK_FALSE, then all pipelines to be bound with the subpass must have
the same value for
VkPipelineMultisampleStateCreateInfo::rasterizationSamples.
In all such cases, rasterizationSamples must be a valid
VkSampleCountFlagBits value that is set in
VkPhysicalDeviceLimits::framebufferNoAttachmentsSampleCounts.
- 
VUID-VkFramebufferCreateInfo-attachmentCount-00876 
 attachmentCountmust be equal to the attachment count specified inrenderPass
- 
VUID-VkFramebufferCreateInfo-flags-02778 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BITandattachmentCountis not0,pAttachmentsmust be a valid pointer to an array ofattachmentCountvalid VkImageView handles
- 
VUID-VkFramebufferCreateInfo-pAttachments-00877 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as a color attachment or resolve attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-pAttachments-02633 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as a depth/stencil attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-pAttachments-02634 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as a depth/stencil resolve attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-pAttachments-00879 
 Ifrenderpassis not VK_NULL_HANDLE,flagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as an input attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-pAttachments-02552 
 Each element ofpAttachmentsthat is used as a fragment density map attachment byrenderPassmust not have been created with aflagsvalue includingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
- 
VUID-VkFramebufferCreateInfo-renderPass-02553 
 IfrenderPasshas a fragment density map attachment and thefragmentDensityMapNonSubsampledImagesfeature is not enabled, each element ofpAttachmentsmust have been created with aflagsvalue includingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXTunless that element is the fragment density map attachment
- 
VUID-VkFramebufferCreateInfo-renderPass-10830 
 IfrenderPasswas created withVK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE, thenlayersmust be less than or equal tomaxFragmentDensityMapLayers
- 
VUID-VkFramebufferCreateInfo-pAttachments-00880 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsmust have been created with a VkFormat value that matches the VkFormat specified by the correspondingVkAttachmentDescriptioninrenderPass
- 
VUID-VkFramebufferCreateInfo-pAttachments-00881 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsmust have been created with asamplesvalue that matches thesamplesvalue specified by the correspondingVkAttachmentDescriptioninrenderPass
- 
VUID-VkFramebufferCreateInfo-flags-04533 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as an input, color, resolve, or depth/stencil attachment byrenderPassmust have been created with a VkImageCreateInfo::extent.widthgreater than or equal towidth
- 
VUID-VkFramebufferCreateInfo-flags-04534 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as an input, color, resolve, or depth/stencil attachment byrenderPassmust have been created with a VkImageCreateInfo::extent.heightgreater than or equal toheight
- 
VUID-VkFramebufferCreateInfo-flags-04535 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as an input, color, resolve, or depth/stencil attachment byrenderPassmust have been created with a VkImageViewCreateInfo::subresourceRange.layerCountgreater than or equal tolayers
- 
VUID-VkFramebufferCreateInfo-renderPass-04536 
 IfrenderPasswas specified with non-zero view masks, each element ofpAttachmentsthat is used as an input, color, resolve, or depth/stencil attachment byrenderPassmust have alayerCountgreater than the index of the most significant bit set in any of those view masks
- 
VUID-VkFramebufferCreateInfo-renderPass-02746 
 Each element ofpAttachmentsthat is referenced byfragmentDensityMapAttachmentmust have alayerCountequal to1or ifrenderPasswas specified with non-zero view masks, greater than the index of the most significant bit set in any of those view masks
- 
VUID-VkFramebufferCreateInfo-pAttachments-02555 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element ofpAttachmentsthat is referenced byfragmentDensityMapAttachmentmust have a width at least as large as ⌈maxFragmentDensityTexelSizewidthwidth⌉
- 
VUID-VkFramebufferCreateInfo-pAttachments-02556 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element ofpAttachmentsthat is referenced byfragmentDensityMapAttachmentmust have a height at least as large as ⌈maxFragmentDensityTexelSizeheightheight⌉
- 
VUID-VkFramebufferCreateInfo-flags-04537 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, andrenderPasswas specified with non-zero view masks, each element ofpAttachmentsthat is used as a fragment shading rate attachment byrenderPassmust have alayerCountthat is either1, or greater than the index of the most significant bit set in any of those view masks
- 
VUID-VkFramebufferCreateInfo-flags-04538 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, andrenderPasswas not specified with non-zero view masks, each element ofpAttachmentsthat is used as a fragment shading rate attachment byrenderPassmust have alayerCountthat is either1, or greater thanlayers
- 
VUID-VkFramebufferCreateInfo-flags-04539 
 If themaintenance7feature is not enabled or therobustFragmentShadingRateAttachmentAccesslimit isVK_FALSEor theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::baseMipLevelgreater than 0,flagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element ofpAttachmentsthat is used as a fragment shading rate attachment must have a width at least as large as ⌈width/texelWidth⌉, wheretexelWidthis the largest value ofshadingRateAttachmentTexelSize.widthin a VkFragmentShadingRateAttachmentInfoKHR which references that attachment
- 
VUID-VkFramebufferCreateInfo-flags-04540 
 If themaintenance7feature is not enabled or therobustFragmentShadingRateAttachmentAccesslimit isVK_FALSEor theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::baseMipLevelgreater than 0,flagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, an element ofpAttachmentsthat is used as a fragment shading rate attachment must have a height at least as large as ⌈height/texelHeight⌉, wheretexelHeightis the largest value ofshadingRateAttachmentTexelSize.heightin a VkFragmentShadingRateAttachmentInfoKHR which references that attachment
- 
VUID-VkFramebufferCreateInfo-pAttachments-00883 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsmust only specify a single mip level
- 
VUID-VkFramebufferCreateInfo-pAttachments-00884 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsmust have been created with the identity swizzle
- 
VUID-VkFramebufferCreateInfo-width-00885 
 widthmust be greater than0
- 
VUID-VkFramebufferCreateInfo-width-00886 
 widthmust be less than or equal tomaxFramebufferWidth
- 
VUID-VkFramebufferCreateInfo-height-00887 
 heightmust be greater than0
- 
VUID-VkFramebufferCreateInfo-height-00888 
 heightmust be less than or equal tomaxFramebufferHeight
- 
VUID-VkFramebufferCreateInfo-layers-00889 
 layersmust be greater than0
- 
VUID-VkFramebufferCreateInfo-layers-00890 
 layersmust be less than or equal tomaxFramebufferLayers
- 
VUID-VkFramebufferCreateInfo-renderPass-02531 
 IfrenderPasswas specified with non-zero view masks,layersmust be1
- 
VUID-VkFramebufferCreateInfo-pAttachments-00891 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format
- 
VUID-VkFramebufferCreateInfo-flags-03189 
 If theimagelessFramebufferfeature is not enabled,flagsmust not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT
- 
VUID-VkFramebufferCreateInfo-flags-03190 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thepNextchain must include a VkFramebufferAttachmentsCreateInfo structure
- 
VUID-VkFramebufferCreateInfo-flags-03191 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theattachmentImageInfoCountmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain must be equal to either zero orattachmentCount
- 
VUID-VkFramebufferCreateInfo-flags-04541 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thewidthmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is used as an input, color, resolve or depth/stencil attachment inrenderPassmust be greater than or equal towidth
- 
VUID-VkFramebufferCreateInfo-flags-04542 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theheightmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is used as an input, color, resolve or depth/stencil attachment inrenderPassmust be greater than or equal toheight
- 
VUID-VkFramebufferCreateInfo-flags-03196 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thewidthmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is referenced by VkRenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachmentinrenderPassmust be greater than or equal to ⌈maxFragmentDensityTexelSizewidthwidth⌉
- 
VUID-VkFramebufferCreateInfo-flags-03197 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theheightmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain that is referenced by VkRenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachmentinrenderPassmust be greater than or equal to ⌈maxFragmentDensityTexelSizeheightheight⌉
- 
VUID-VkFramebufferCreateInfo-flags-04543 
 If themaintenance7feature is not enabled or therobustFragmentShadingRateAttachmentAccesslimit isVK_FALSEor theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::baseMipLevelgreater than 0, andflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thewidthmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is used as a fragment shading rate attachment must be greater than or equal to ⌈width/texelWidth⌉, wheretexelWidthis the largest value ofshadingRateAttachmentTexelSize.widthin a VkFragmentShadingRateAttachmentInfoKHR which references that attachment
- 
VUID-VkFramebufferCreateInfo-flags-04544 
 If themaintenance7feature is not enabled or therobustFragmentShadingRateAttachmentAccesslimit isVK_FALSEor theimageViewmember of a VkRenderingFragmentShadingRateAttachmentInfoKHR structure was created with VkImageSubresourceRange::baseMipLevelgreater than 0, andflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theheightmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is used as a fragment shading rate attachment must be greater than or equal to ⌈height/texelHeight⌉, wheretexelHeightis the largest value ofshadingRateAttachmentTexelSize.heightin a VkFragmentShadingRateAttachmentInfoKHR which references that attachment
- 
VUID-VkFramebufferCreateInfo-flags-04545 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thelayerCountmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is used as a fragment shading rate attachment must be either1, or greater than or equal tolayers
- 
VUID-VkFramebufferCreateInfo-flags-04587 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BITandrenderPasswas specified with non-zero view masks, thelayerCountmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure in thepNextchain that is used as a fragment shading rate attachment must be either1, or greater than the index of the most significant bit set in any of those view masks
- 
VUID-VkFramebufferCreateInfo-renderPass-03198 
 If multiview is enabled forrenderPassandflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thelayerCountmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain used as an input, color, resolve, or depth/stencil attachment inrenderPassmust be greater than the maximum bit index set in the view mask in the subpasses in which it is used inrenderPass
- 
VUID-VkFramebufferCreateInfo-renderPass-04546 
 If multiview is not enabled forrenderPassandflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, thelayerCountmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain used as an input, color, resolve, or depth/stencil attachment inrenderPassmust be greater than or equal tolayers
- 
VUID-VkFramebufferCreateInfo-flags-03201 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theusagemember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain that refers to an attachment used as a color attachment or resolve attachment byrenderPassmust includeVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-flags-03202 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theusagemember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain that refers to an attachment used as a depth/stencil attachment byrenderPassmust includeVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-flags-03203 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theusagemember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain that refers to an attachment used as a depth/stencil resolve attachment byrenderPassmust includeVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-flags-03204 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theusagemember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain that refers to an attachment used as an input attachment byrenderPassmust includeVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
- 
VUID-VkFramebufferCreateInfo-flags-03205 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, at least one element of thepViewFormatsmember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain must be equal to the corresponding value of VkAttachmentDescription::formatused to createrenderPass
- 
VUID-VkFramebufferCreateInfo-flags-04113 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsmust have been created with VkImageViewCreateInfo::viewTypenot equal toVK_IMAGE_VIEW_TYPE_3D
- 
VUID-VkFramebufferCreateInfo-flags-04548 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element ofpAttachmentsthat is used as a fragment shading rate attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
- 
VUID-VkFramebufferCreateInfo-flags-04549 
 IfflagsincludesVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, theusagemember of any element of thepAttachmentImageInfosmember of a VkFramebufferAttachmentsCreateInfo structure included in thepNextchain that refers to an attachment used as a fragment shading rate attachment byrenderPassmust includeVK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
- 
VUID-VkFramebufferCreateInfo-samples-06881 
 If multisampled-render-to-single-sampled is enabled for any subpass, all color, depth/stencil and input attachments used in that subpass which haveVkAttachmentDescription::samplesorVkAttachmentDescription2::samplesequal toVK_SAMPLE_COUNT_1_BITmust have been created withVK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXTin their VkImageCreateInfo::flags
- 
VUID-VkFramebufferCreateInfo-samples-07009 
 If multisampled-render-to-single-sampled is enabled for any subpass, all color, depth/stencil and input attachments used in that subpass which haveVkAttachmentDescription::samplesorVkAttachmentDescription2::samplesequal toVK_SAMPLE_COUNT_1_BITmust have a format that supports the sample count specified in VkMultisampledRenderToSingleSampledInfoEXT::rasterizationSamples
- 
VUID-VkFramebufferCreateInfo-nullColorAttachmentWithExternalFormatResolve-09349 
 If thenullColorAttachmentWithExternalFormatResolveisVK_FALSE, andflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the format of the color attachment for each subpass inrenderPassthat includes an external format image as a resolve attachment must have a format equal to the value of VkAndroidHardwareBufferFormatResolvePropertiesANDROID::colorAttachmentFormatas returned by a call to vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer that was used to create the image view use as its resolve attachment
- 
VUID-VkFramebufferCreateInfo-pAttachments-09350 
 Ifflagsdoes not includeVK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, then if an element ofpAttachmentshas a format ofVK_FORMAT_UNDEFINED, it must have been created with a VkExternalFormatANDROID::externalFormatvalue identical to that provided in the VkExternalFormatANDROID::externalFormatspecified by the corresponding VkAttachmentDescription2 inrenderPass
- 
VUID-VkFramebufferCreateInfo-sType-sType 
 sTypemust beVK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
- 
VUID-VkFramebufferCreateInfo-pNext-pNext 
 pNextmust beNULLor a pointer to a valid instance of VkFramebufferAttachmentsCreateInfo
- 
VUID-VkFramebufferCreateInfo-sType-unique 
 ThesTypevalue of each structure in thepNextchain must be unique
- 
VUID-VkFramebufferCreateInfo-flags-parameter 
 flagsmust be a valid combination of VkFramebufferCreateFlagBits values
- 
VUID-VkFramebufferCreateInfo-renderPass-parameter 
 renderPassmust be a valid VkRenderPass handle
- 
VUID-VkFramebufferCreateInfo-commonparent 
 Both ofrenderPass, and the elements ofpAttachmentsthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
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.