VkFramebufferCreateInfo - Structure specifying parameters of a newly
created framebuffer
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 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
PipelineMultisampleStateCreateInfo to
define the number of samples used in rasterization; however, if
PhysicalDeviceFeatures::variableMultisampleRate
is FALSE, then all pipelines to be
bound with the subpass must have the same value for
PipelineMultisampleStateCreateInfo::rasterizationSamples.
In all such cases, rasterizationSamples must be a valid
SampleCountFlagBits value that
is set in
PhysicalDeviceLimits::framebufferNoAttachmentsSampleCounts.
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT
and attachmentCount is not 0, pAttachments must be a valid
pointer to an array of attachmentCount valid
ImageView handles
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as a color attachment or
resolve attachment by renderPass must have been created with the
IMAGE_USAGE_COLOR_ATTACHMENT_BIT
usage flag set
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as a depth/stencil
attachment by renderPass must have been created with the
IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
usage flag set
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as a depth/stencil
resolve attachment by renderPass must have been created with the
IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
usage flag set
If renderpass is
not NULL_HANDLE, flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as an input attachment
by renderPass must have been created with the
IMAGE_USAGE_INPUT_ATTACHMENT_BIT
usage flag set
Each element of
pAttachments that is used as a fragment density map attachment by
renderPass must not have been created with a flags value
including
IMAGE_CREATE_SUBSAMPLED_BIT_EXT
If renderPass has
a fragment density map attachment and the
fragmentDensityMapNonSubsampledImages
feature is not enabled, each element of pAttachments must have
been created with a flags value including
IMAGE_CREATE_SUBSAMPLED_BIT_EXT
unless that element is the fragment density map attachment
If renderPass was
created with
RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE,
then layers must be less than or equal to
maxFragmentDensityMapLayers
If flags does not
include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, then each element of
pAttachments that is used as a resolve attachment by renderPass
must not be bound to a DeviceMemory object
allocated from a MemoryHeap
with the
MEMORY_HEAP_TILE_MEMORY_BIT_QCOM
property
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments must have been created with a
Format value that matches the
Format specified by the corresponding
AttachmentDescription in renderPass
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments must have been created with a
samples value that matches the samples value specified by the
corresponding AttachmentDescription in renderPass
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as an input, color,
resolve, or depth/stencil attachment by renderPass must have
been created with a
ImageCreateInfo::extent.width greater than
or equal to width
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as an input, color,
resolve, or depth/stencil attachment by renderPass must have
been created with a
ImageCreateInfo::extent.height greater than
or equal to height
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as an input, color,
resolve, or depth/stencil attachment by renderPass must have
been created with a
ImageViewCreateInfo::subresourceRange.layerCount
greater than or equal to layers
If renderPass was
specified with non-zero view masks, each element of pAttachments
that is used as an input, color, resolve, or depth/stencil
attachment by renderPass must have a layerCount greater than
the index of the most significant bit set in any of those view masks
Each element of
pAttachments that is referenced by fragmentDensityMapAttachment
must have a layerCount equal to 1 or if renderPass was
specified with non-zero view masks, greater than the index of the
most significant bit set in any of those view masks
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
an element of pAttachments that is referenced by
fragmentDensityMapAttachment must have a width at least as large
as
\left\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\right\rceil
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
an element of pAttachments that is referenced by
fragmentDensityMapAttachment must have a height at least as
large as
\left\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\right\rceil
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
and renderPass was specified with non-zero view masks, each
element of pAttachments that is used as a
fragment shading rate attachment
by renderPass must have a layerCount that is either 1, or
greater than the index of the most significant bit set in any of
those view masks
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
and renderPass was not specified with non-zero view masks, each
element of pAttachments that is used as a
fragment shading rate attachment
by renderPass must have a layerCount that is either 1, or
greater than layers
If the
maintenance7
feature is not enabled or the
robustFragmentShadingRateAttachmentAccess
limit is FALSE or the imageView
member of a
RenderingFragmentShadingRateAttachmentInfoKHR
structure was created with
ImageSubresourceRange::baseMipLevel
greater than 0, flags does not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
an element of pAttachments that is used as a
fragment shading rate attachment
must have a width at least as large as ⌈width / texelWidth⌉,
where texelWidth is the largest value of
shadingRateAttachmentTexelSize.width in a
FragmentShadingRateAttachmentInfoKHR
which references that attachment
If the
maintenance7
feature is not enabled or the
robustFragmentShadingRateAttachmentAccess
limit is FALSE or the imageView
member of a
RenderingFragmentShadingRateAttachmentInfoKHR
structure was created with
ImageSubresourceRange::baseMipLevel
greater than 0, flags does not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
an element of pAttachments that is used as a
fragment shading rate attachment
must have a height at least as large as ⌈height /
texelHeight⌉, where texelHeight is the largest value of
shadingRateAttachmentTexelSize.height in a
FragmentShadingRateAttachmentInfoKHR
which references that attachment
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments must only specify a single mip
level
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments must have been created with the
identity swizzle
width must be greater
than 0
width must be less
than or equal to
maxFramebufferWidth
height must be
greater than 0
height must be less
than or equal to
maxFramebufferHeight
layers must be
greater than 0
layers must be less
than or equal to
maxFramebufferLayers
If renderPass was
specified with non-zero view masks, layers must be 1
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is a 2D or 2D array image view
taken from a 3D image must not be a depth/stencil format
If the
imagelessFramebuffer
feature is not enabled, flags must not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the pNext chain must include a
FramebufferAttachmentsCreateInfo
structure
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the attachmentImageInfoCount member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain must be equal to either zero or
attachmentCount
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the width member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is used as an input, color,
resolve, or depth/stencil attachment in renderPass must be
greater than or equal to width
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the height member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is used as an input, color,
resolve, or depth/stencil attachment in renderPass must be
greater than or equal to height
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the width member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is referenced by
RenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachment
in renderPass must be greater than or equal to
\left\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\right\rceil
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the height member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain that is referenced by
RenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachment
in renderPass must be greater than or equal to
\left\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\right\rceil
If the
maintenance7
feature is not enabled or the
robustFragmentShadingRateAttachmentAccess
limit is FALSE or the imageView
member of a
RenderingFragmentShadingRateAttachmentInfoKHR
structure was created with
ImageSubresourceRange::baseMipLevel
greater than 0, and flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the width member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is used as a
fragment shading rate attachment
must be greater than or equal to ⌈width / texelWidth⌉, where
texelWidth is the largest value of
shadingRateAttachmentTexelSize.width in a
FragmentShadingRateAttachmentInfoKHR
which references that attachment
If the
maintenance7
feature is not enabled or the
robustFragmentShadingRateAttachmentAccess
limit is FALSE or the imageView
member of a
RenderingFragmentShadingRateAttachmentInfoKHR
structure was created with
ImageSubresourceRange::baseMipLevel
greater than 0, and flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the height member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is used as a
fragment shading rate attachment
must be greater than or equal to ⌈height / texelHeight⌉,
where texelHeight is the largest value of
shadingRateAttachmentTexelSize.height in a
FragmentShadingRateAttachmentInfoKHR
which references that attachment
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the layerCount member of any element of the
pAttachmentImageInfos member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is used as a
fragment shading rate attachment
must be either 1, or greater than or equal to layers
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT
and renderPass was specified with non-zero view masks, the
layerCount member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure in the pNext chain that is used as a
fragment shading rate attachment
must be either 1, or greater than the index of the most
significant bit set in any of those view masks
If multiview is
enabled for renderPass and flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the layerCount member of any element of the
pAttachmentImageInfos member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain used as an input, color,
resolve, or depth/stencil attachment in renderPass must be
greater than the maximum bit index set in the view mask in the
subpasses in which it is used in renderPass
If multiview is not
enabled for renderPass and flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the layerCount member of any element of the
pAttachmentImageInfos member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain used as an input, color,
resolve, or depth/stencil attachment in renderPass must be
greater than or equal to layers
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the usage member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain that refers to an attachment
used as a color attachment or resolve attachment by renderPass
must include
IMAGE_USAGE_COLOR_ATTACHMENT_BIT
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the usage member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain that refers to an attachment
used as a depth/stencil attachment by renderPass must include
IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the usage member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain that refers to an attachment
used as a depth/stencil resolve attachment by renderPass must
include
IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the usage member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain that refers to an attachment
used as an input attachment by renderPass must include
IMAGE_USAGE_INPUT_ATTACHMENT_BIT
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
at least one element of the pViewFormats member of any element of
the pAttachmentImageInfos member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain must be equal to the
corresponding value of AttachmentDescription::format used to
create renderPass
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments must have been created with
ImageViewCreateInfo::viewType not equal
to IMAGE_VIEW_TYPE_3D
If flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
each element of pAttachments that is used as a fragment shading
rate attachment by renderPass must have been created with the
IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
usage flag set
If flags includes
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the usage member of any element of the pAttachmentImageInfos
member of a
FramebufferAttachmentsCreateInfo
structure included in the pNext chain that refers to an attachment
used as a fragment shading rate attachment by renderPass must
include
IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
If
multisampled-render-to-single-sampled
is enabled for any subpass, all color, depth/stencil, and input
attachments used in that subpass which have
AttachmentDescription::samples or
AttachmentDescription2::samples
equal to
SAMPLE_COUNT_1_BIT must
have been created with
IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT
in their ImageCreateInfo::flags
If
multisampled-render-to-single-sampled
is enabled for any subpass, all color, depth/stencil, and input
attachments used in that subpass which have
AttachmentDescription::samples or
AttachmentDescription2::samples
equal to
SAMPLE_COUNT_1_BIT must
have a format that supports the sample count specified in
MultisampledRenderToSingleSampledInfoEXT::rasterizationSamples
If the
nullColorAttachmentWithExternalFormatResolve
is FALSE, and flags does not
include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
the format of the color attachment for each subpass in renderPass
that includes an external format image as a resolve attachment
must have a format equal to the value of
AndroidHardwareBufferFormatResolvePropertiesANDROID::colorAttachmentFormat
as returned by a call to
getAndroidHardwareBufferPropertiesANDROID
for the Android hardware buffer that was used to create the image
view use as its resolve attachment
If flags does
not include
FRAMEBUFFER_CREATE_IMAGELESS_BIT,
then if an element of pAttachments has a format of
FORMAT_UNDEFINED, it must have been
created with a
ExternalFormatANDROID::externalFormat
value identical to that provided in the
ExternalFormatANDROID::externalFormat
specified by the corresponding
AttachmentDescription2
in renderPass