Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- createFramebuffer :: forall a io. (Extendss FramebufferCreateInfo a, PokeChain a, MonadIO io) => Device -> FramebufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Framebuffer
- withFramebuffer :: forall a io r. (Extendss FramebufferCreateInfo a, PokeChain a, MonadIO io) => Device -> FramebufferCreateInfo a -> Maybe AllocationCallbacks -> (io Framebuffer -> (Framebuffer -> io ()) -> r) -> r
- destroyFramebuffer :: forall io. MonadIO io => Device -> Framebuffer -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- createRenderPass :: forall a io. (Extendss RenderPassCreateInfo a, PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io RenderPass
- withRenderPass :: forall a io r. (Extendss RenderPassCreateInfo a, PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo a -> Maybe AllocationCallbacks -> (io RenderPass -> (RenderPass -> io ()) -> r) -> r
- destroyRenderPass :: forall io. MonadIO io => Device -> RenderPass -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getRenderAreaGranularity :: forall io. MonadIO io => Device -> RenderPass -> io ("granularity" ::: Extent2D)
- data AttachmentDescription = AttachmentDescription {}
- data AttachmentReference = AttachmentReference {}
- data SubpassDescription = SubpassDescription {}
- data SubpassDependency = SubpassDependency {}
- data RenderPassCreateInfo (es :: [Type]) = RenderPassCreateInfo {}
- data FramebufferCreateInfo (es :: [Type]) = FramebufferCreateInfo {
- next :: Chain es
- flags :: FramebufferCreateFlags
- renderPass :: RenderPass
- attachments :: Vector ImageView
- width :: Word32
- height :: Word32
- layers :: Word32
Documentation
createFramebuffer :: forall a io. (Extendss FramebufferCreateInfo a, PokeChain a, MonadIO io) => Device -> FramebufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Framebuffer Source #
vkCreateFramebuffer - Create a new framebuffer object
Parameters
device
is the logical device that creates the framebuffer.
pCreateInfo
is a pointer to aFramebufferCreateInfo
structure describing additional information about framebuffer creation.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pFramebuffer
is a pointer to aFramebuffer
handle in which the resulting framebuffer object is returned.
Valid Usage
- If
pCreateInfo->flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, andattachmentCount
is not0
, each element ofpCreateInfo->pAttachments
must have been created ondevice
Valid Usage (Implicit)
device
must be a validDevice
handle
pCreateInfo
must be a valid pointer to a validFramebufferCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pFramebuffer
must be a valid pointer to aFramebuffer
handle
Return Codes
See Also
AllocationCallbacks
,
Device
, Framebuffer
,
FramebufferCreateInfo
withFramebuffer :: forall a io r. (Extendss FramebufferCreateInfo a, PokeChain a, MonadIO io) => Device -> FramebufferCreateInfo a -> Maybe AllocationCallbacks -> (io Framebuffer -> (Framebuffer -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createFramebuffer
and destroyFramebuffer
To ensure that destroyFramebuffer
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the first argument.
To just extract the pair pass (,)
as the first argument.
destroyFramebuffer :: forall io. MonadIO io => Device -> Framebuffer -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyFramebuffer - Destroy a framebuffer object
Parameters
device
is the logical device that destroys the framebuffer.
framebuffer
is the handle of the framebuffer to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
framebuffer
must have completed execution
- If
AllocationCallbacks
were provided whenframebuffer
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenframebuffer
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validDevice
handle
- If
framebuffer
is notNULL_HANDLE
,framebuffer
must be a validFramebuffer
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
framebuffer
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
framebuffer
must be externally synchronized
See Also
createRenderPass :: forall a io. (Extendss RenderPassCreateInfo a, PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io RenderPass Source #
vkCreateRenderPass - Create a new render pass object
Parameters
device
is the logical device that creates the render pass.
pCreateInfo
is a pointer to aRenderPassCreateInfo
structure describing the parameters of the render pass.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pRenderPass
is a pointer to aRenderPass
handle in which the resulting render pass object is returned.
Valid Usage (Implicit)
device
must be a validDevice
handle
pCreateInfo
must be a valid pointer to a validRenderPassCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pRenderPass
must be a valid pointer to aRenderPass
handle
Return Codes
See Also
AllocationCallbacks
,
Device
, RenderPass
,
RenderPassCreateInfo
withRenderPass :: forall a io r. (Extendss RenderPassCreateInfo a, PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo a -> Maybe AllocationCallbacks -> (io RenderPass -> (RenderPass -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createRenderPass
and destroyRenderPass
To ensure that destroyRenderPass
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the first argument.
To just extract the pair pass (,)
as the first argument.
destroyRenderPass :: forall io. MonadIO io => Device -> RenderPass -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyRenderPass - Destroy a render pass object
Parameters
device
is the logical device that destroys the render pass.
renderPass
is the handle of the render pass to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
renderPass
must have completed execution
- If
AllocationCallbacks
were provided whenrenderPass
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenrenderPass
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validDevice
handle
- If
renderPass
is notNULL_HANDLE
,renderPass
must be a validRenderPass
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
renderPass
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
renderPass
must be externally synchronized
See Also
getRenderAreaGranularity :: forall io. MonadIO io => Device -> RenderPass -> io ("granularity" ::: Extent2D) Source #
vkGetRenderAreaGranularity - Returns the granularity for optimal render area
Parameters
device
is the logical device that owns the render pass.
renderPass
is a handle to a render pass.pGranularity
is a pointer to aExtent2D
structure in which the granularity is returned.
Description
The conditions leading to an optimal renderArea
are:
- the
offset.x
member inrenderArea
is a multiple of thewidth
member of the returnedExtent2D
(the horizontal granularity). - the
offset.y
member inrenderArea
is a multiple of theheight
of the returnedExtent2D
(the vertical granularity). - either the
offset.width
member inrenderArea
is a multiple of the horizontal granularity oroffset.x
+offset.width
is equal to thewidth
of theframebuffer
in theRenderPassBeginInfo
. - either the
offset.height
member inrenderArea
is a multiple of the vertical granularity oroffset.y
+offset.height
is equal to theheight
of theframebuffer
in theRenderPassBeginInfo
.
Subpass dependencies are not affected by the render area, and apply to the entire image subresources attached to the framebuffer as specified in the description of automatic layout transitions. Similarly, pipeline barriers are valid even if their effect extends outside the render area.
Valid Usage (Implicit)
device
must be a validDevice
handle
renderPass
must be a validRenderPass
handlepGranularity
must be a valid pointer to aExtent2D
structurerenderPass
must have been created, allocated, or retrieved fromdevice
See Also
data AttachmentDescription Source #
VkAttachmentDescription - Structure specifying an attachment description
Description
If the attachment uses a color format, then loadOp
and storeOp
are
used, and stencilLoadOp
and stencilStoreOp
are ignored. If the
format has depth and/or stencil components, loadOp
and storeOp
apply only to the depth data, while stencilLoadOp
and stencilStoreOp
define how the stencil data is handled. loadOp
and stencilLoadOp
define the load operations that execute as part of the first subpass
that uses the attachment. storeOp
and stencilStoreOp
define the
store operations that execute as part of the last subpass that uses
the attachment.
The load operation for each sample in an attachment happens-before any
recorded command which accesses the sample in the first subpass where
the attachment is used. Load operations for attachments with a
depth/stencil format execute in the
PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
pipeline stage. Load operations for attachments with a color format
execute in the
PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
pipeline stage.
The store operation for each sample in an attachment happens-after any
recorded command which accesses the sample in the last subpass where the
attachment is used. Store operations for attachments with a
depth/stencil format execute in the
PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
pipeline stage. Store operations for attachments with a color format
execute in the
PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
pipeline stage.
If an attachment is not used by any subpass, then loadOp
, storeOp
,
stencilStoreOp
, and stencilLoadOp
are ignored, and the attachment’s
memory contents will not be modified by execution of a render pass
instance.
The load and store operations apply on the first and last use of each view in the render pass, respectively. If a view index of an attachment is not included in the view mask in any subpass that uses it, then the load and store operations are ignored, and the attachment’s memory contents will not be modified by execution of a render pass instance.
During a render pass instance, input/color attachments with color
formats that have a component size of 8, 16, or 32 bits must be
represented in the attachment’s format throughout the instance.
Attachments with other floating- or fixed-point color formats, or with
depth components may be represented in a format with a precision
higher than the attachment format, but must be represented with the
same range. When such a component is loaded via the loadOp
, it will be
converted into an implementation-dependent format used by the render
pass. Such components must be converted from the render pass format,
to the format of the attachment, before they are resolved or stored at
the end of a render pass instance via storeOp
. Conversions occur as
described in
Numeric Representation and Computation
and
Fixed-Point Data Conversions.
If flags
includes
ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
,
then the attachment is treated as if it shares physical memory with
another attachment in the same render pass. This information limits the
ability of the implementation to reorder certain operations (like layout
transitions and the loadOp
) such that it is not improperly reordered
against other uses of the same physical memory via a different
attachment. This is described in more detail below.
If a render pass uses multiple attachments that alias the same device
memory, those attachments must each include the
ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
bit in their attachment description flags. Attachments aliasing the same
memory occurs in multiple ways:
- Multiple attachments being assigned the same image view as part of framebuffer creation.
- Attachments using distinct image views that correspond to the same image subresource of an image.
- Attachments using views of distinct image subresources which are bound to overlapping memory ranges.
Note
Render passes must include subpass dependencies (either directly or
via a subpass dependency chain) between any two subpasses that operate
on the same attachment or aliasing attachments and those subpass
dependencies must include execution and memory dependencies separating
uses of the aliases, if at least one of those subpasses writes to one of
the aliases. These dependencies must not include the
DEPENDENCY_BY_REGION_BIT
if the
aliases are views of distinct image subresources which overlap in
memory.
Multiple attachments that alias the same memory must not be used in a single subpass. A given attachment index must not be used multiple times in a single subpass, with one exception: two subpass attachments can use the same attachment index if at least one use is as an input attachment and neither use is as a resolve or preserve attachment. In other words, the same view can be used simultaneously as an input and color or depth/stencil attachment, but must not be used as multiple color or depth/stencil attachments nor as resolve or preserve attachments. The precise set of valid scenarios is described in more detail below.
If a set of attachments alias each other, then all except the first to
be used in the render pass must use an initialLayout
of
IMAGE_LAYOUT_UNDEFINED
, since the
earlier uses of the other aliases make their contents undefined. Once an
alias has been used and a different alias has been used after it, the
first alias must not be used in any later subpasses. However, an
application can assign the same image view to multiple aliasing
attachment indices, which allows that image view to be used multiple
times even if other aliases are used in between.
Note
Once an attachment needs the
ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
bit, there should be no additional cost of introducing additional
aliases, and using these additional aliases may allow more efficient
clearing of the attachments on multiple uses via
ATTACHMENT_LOAD_OP_CLEAR
.
Valid Usage
finalLayout
must not beIMAGE_LAYOUT_UNDEFINED
orIMAGE_LAYOUT_PREINITIALIZED
- If
format
is a color format,initialLayout
must not beIMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
, orIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
- If
format
is a depth/stencil format,initialLayout
must not beIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
- If
format
is a color format,finalLayout
must not beIMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
, orIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
- If
format
is a depth/stencil format,finalLayout
must not beIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
- If the
separateDepthStencilLayouts
feature is not enabled,
initialLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If the
separateDepthStencilLayouts
feature is not enabled,
finalLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a color format,initialLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a color format,finalLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a depth/stencil format which includes both depth and stencil aspects,initialLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a depth/stencil format which includes both depth and stencil aspects,finalLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a depth/stencil format which includes only the depth aspect,initialLayout
must not beIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a depth/stencil format which includes only the depth aspect,finalLayout
must not beIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If
format
is a depth/stencil format which includes only the stencil aspect,initialLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
orIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
- If
format
is a depth/stencil format which includes only the stencil aspect,finalLayout
must not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
orIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
Valid Usage (Implicit)
flags
must be a valid combination ofAttachmentDescriptionFlagBits
values
format
must be a validFormat
valuesamples
must be a validSampleCountFlagBits
valueloadOp
must be a validAttachmentLoadOp
valuestoreOp
must be a validAttachmentStoreOp
valuestencilLoadOp
must be a validAttachmentLoadOp
valuestencilStoreOp
must be a validAttachmentStoreOp
valueinitialLayout
must be a validImageLayout
valuefinalLayout
must be a validImageLayout
value
See Also
AttachmentDescriptionFlags
,
AttachmentLoadOp
,
AttachmentStoreOp
,
Format
,
ImageLayout
, RenderPassCreateInfo
,
SampleCountFlagBits
AttachmentDescription | |
|
Instances
data AttachmentReference Source #
VkAttachmentReference - Structure specifying an attachment reference
Valid Usage
- If
attachment
is notATTACHMENT_UNUSED
,layout
must not beIMAGE_LAYOUT_UNDEFINED
,IMAGE_LAYOUT_PREINITIALIZED
,IMAGE_LAYOUT_PRESENT_SRC_KHR
,IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR
,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR
,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR
, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR
Valid Usage (Implicit)
layout
must be a validImageLayout
value
See Also
ImageLayout
,
RenderPassFragmentDensityMapCreateInfoEXT
,
SubpassDescription
AttachmentReference | |
|
Instances
data SubpassDescription Source #
VkSubpassDescription - Structure specifying a subpass description
Description
Each element of the pInputAttachments
array corresponds to an input
attachment index in a fragment shader, i.e. if a shader declares an
image variable decorated with a InputAttachmentIndex
value of X,
then it uses the attachment provided in pInputAttachments
[X].
Input attachments must also be bound to the pipeline in a descriptor
set. If the attachment
member of any element of pInputAttachments
is
ATTACHMENT_UNUSED
, the application must
not read from the corresponding input attachment index. Fragment shaders
can use subpass input variables to access the contents of an input
attachment at the fragment’s (x, y, layer) framebuffer coordinates.
Input attachments must not be used by any subpasses within a
renderpass that enables
render pass transform.
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 attachment
member of
any element of pColorAttachments
is
ATTACHMENT_UNUSED
, writes to the
corresponding location by a fragment are discarded.
If flags
does not include
SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM
,
and if pResolveAttachments
is not NULL
, each of its elements
corresponds to a color attachment (the element in pColorAttachments
at
the same index), and a multisample resolve operation is defined for each
attachment. At the end of each subpass, multisample resolve operations
read the subpass’s color attachments, and resolve the samples for each
pixel within the render area to the same pixel location in the
corresponding resolve attachments, unless the resolve attachment index
is ATTACHMENT_UNUSED
.
Similarly, if flags
does not include
SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM
,
and
SubpassDescriptionDepthStencilResolve
::pDepthStencilResolveAttachment
is not NULL
and does not have the value
ATTACHMENT_UNUSED
, it corresponds to the
depth/stencil attachment in pDepthStencilAttachment
, and multisample
resolve operations for depth and stencil are defined by
SubpassDescriptionDepthStencilResolve
::depthResolveMode
and
SubpassDescriptionDepthStencilResolve
::stencilResolveMode
,
respectively. At the end of each subpass, multisample resolve operations
read the subpass’s depth/stencil attachment, and resolve the samples
for each pixel to the same pixel location in the corresponding resolve
attachment. If
SubpassDescriptionDepthStencilResolve
::depthResolveMode
is RESOLVE_MODE_NONE
, then the
depth component of the resolve attachment is not written to and its
contents are preserved. Similarly, if
SubpassDescriptionDepthStencilResolve
::stencilResolveMode
is RESOLVE_MODE_NONE
, then the
stencil component of the resolve attachment is not written to and its
contents are preserved.
SubpassDescriptionDepthStencilResolve
::depthResolveMode
is ignored if the Format
of the
pDepthStencilResolveAttachment
does not have a depth component.
Similarly,
SubpassDescriptionDepthStencilResolve
::stencilResolveMode
is ignored if the Format
of the
pDepthStencilResolveAttachment
does not have a stencil component.
If the image subresource range referenced by the depth/stencil
attachment is created with
IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
,
then the multisample resolve operation uses the sample locations state
specified in the sampleLocationsInfo
member of the element of the
RenderPassSampleLocationsBeginInfoEXT
::pPostSubpassSampleLocations
for the subpass.
If pDepthStencilAttachment
is NULL
, or if its attachment index is
ATTACHMENT_UNUSED
, it indicates that no
depth/stencil attachment will be used in the subpass.
The contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:
- The attachment is used as a color, depth/stencil, or resolve attachment in any subpass in the render pass.
- There is a subpass S1 that uses or preserves the attachment, and a subpass dependency from S1 to S.
- The attachment is not used or preserved in subpass S.
In addition, the contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:
SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM
is set.- The attachment is used as a color or depth/stencil in the subpass.
Once the contents of an attachment become undefined in subpass S, they remain undefined for subpasses in subpass dependency chains starting with subpass S until they are written again. However, they remain valid for subpasses in other subpass dependency chains starting with subpass S1 if those subpasses use or preserve the attachment.
Valid Usage
pipelineBindPoint
must bePIPELINE_BIND_POINT_GRAPHICS
colorAttachmentCount
must be less than or equal toPhysicalDeviceLimits
::maxColorAttachments
- If the first use of an attachment in this render pass is as an input
attachment, and the attachment is not also used as a color or
depth/stencil attachment in the same subpass, then
loadOp
must not beATTACHMENT_LOAD_OP_CLEAR
- If
pResolveAttachments
is notNULL
, for each resolve attachment that is notATTACHMENT_UNUSED
, the corresponding color attachment must not beATTACHMENT_UNUSED
- If
pResolveAttachments
is notNULL
, for each resolve attachment that is notATTACHMENT_UNUSED
, the corresponding color attachment must not have a sample count ofSAMPLE_COUNT_1_BIT
- If
pResolveAttachments
is notNULL
, each resolve attachment that is notATTACHMENT_UNUSED
must have a sample count ofSAMPLE_COUNT_1_BIT
- If
pResolveAttachments
is notNULL
, each resolve attachment that is notATTACHMENT_UNUSED
must have the sameFormat
as its corresponding color attachment - All attachments in
pColorAttachments
that are notATTACHMENT_UNUSED
must have the same sample count - All attachments in
pInputAttachments
that are notATTACHMENT_UNUSED
must have formats whose features contain at least one ofFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
orFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
- All attachments in
pColorAttachments
that are notATTACHMENT_UNUSED
must have formats whose features containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
- All attachments in
pResolveAttachments
that are notATTACHMENT_UNUSED
must have formats whose features containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
- If
pDepthStencilAttachment
is notNULL
and the attachment is notATTACHMENT_UNUSED
then it must have a format whose features containFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
- If the
VK_AMD_mixed_attachment_samples
extension is enabled, and all attachments inpColorAttachments
that are notATTACHMENT_UNUSED
must have a sample count that is smaller than or equal to the sample count ofpDepthStencilAttachment
if it is notATTACHMENT_UNUSED
- If neither the
VK_AMD_mixed_attachment_samples
nor theVK_NV_framebuffer_mixed_samples
extensions are enabled, and ifpDepthStencilAttachment
is notATTACHMENT_UNUSED
and any attachments inpColorAttachments
are notATTACHMENT_UNUSED
, they must have the same sample count - The
attachment
member of each element ofpPreserveAttachments
must not beATTACHMENT_UNUSED
- Each element of
pPreserveAttachments
must not also be an element of any other member of the subpass description - If any attachment is used by more than one
AttachmentReference
member, then each use must use the samelayout
- If
flags
includesSUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX
, it must also includeSUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX
- If
flags
includesSUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM
, and ifpResolveAttachments
is notNULL
, then each resolve attachment must beATTACHMENT_UNUSED
- If
flags
includesSUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM
, and ifpDepthStencilResolveAttachmentKHR
is notNULL
, then the depth/stencil resolve attachment must beATTACHMENT_UNUSED
- If
flags
includesSUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM
, then the subpass must be the last subpass in a subpass dependency chain - If
flags
includesSUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM
, then the sample count of the input attachments must equalrasterizationSamples
- If
flags
includesSUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM
, and ifsampleShadingEnable
is enabled (explicitly or implicitly) thenminSampleShading
must equal 0.0 - If the render pass is created with
RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM
each of the elements ofpInputAttachments
must beATTACHMENT_UNUSED
Valid Usage (Implicit)
flags
must be a valid combination ofSubpassDescriptionFlagBits
values
pipelineBindPoint
must be a validPipelineBindPoint
value- If
inputAttachmentCount
is not0
,pInputAttachments
must be a valid pointer to an array ofinputAttachmentCount
validAttachmentReference
structures - If
colorAttachmentCount
is not0
,pColorAttachments
must be a valid pointer to an array ofcolorAttachmentCount
validAttachmentReference
structures - If
colorAttachmentCount
is not0
, andpResolveAttachments
is notNULL
,pResolveAttachments
must be a valid pointer to an array ofcolorAttachmentCount
validAttachmentReference
structures - If
pDepthStencilAttachment
is notNULL
,pDepthStencilAttachment
must be a valid pointer to a validAttachmentReference
structure - If
preserveAttachmentCount
is not0
,pPreserveAttachments
must be a valid pointer to an array ofpreserveAttachmentCount
uint32_t
values
See Also
AttachmentReference
,
PipelineBindPoint
,
RenderPassCreateInfo
,
SubpassDescriptionFlags
SubpassDescription | |
|
Instances
Show SubpassDescription Source # | |
Defined in Vulkan.Core10.Pass showsPrec :: Int -> SubpassDescription -> ShowS # show :: SubpassDescription -> String # showList :: [SubpassDescription] -> ShowS # | |
FromCStruct SubpassDescription Source # | |
Defined in Vulkan.Core10.Pass | |
ToCStruct SubpassDescription Source # | |
Defined in Vulkan.Core10.Pass withCStruct :: SubpassDescription -> (Ptr SubpassDescription -> IO b) -> IO b Source # pokeCStruct :: Ptr SubpassDescription -> SubpassDescription -> IO b -> IO b Source # withZeroCStruct :: (Ptr SubpassDescription -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr SubpassDescription -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero SubpassDescription Source # | |
Defined in Vulkan.Core10.Pass |
data SubpassDependency Source #
VkSubpassDependency - Structure specifying a subpass dependency
Description
If srcSubpass
is equal to dstSubpass
then the SubpassDependency
describes a
subpass self-dependency,
and only constrains the pipeline barriers allowed within a subpass
instance. Otherwise, when a render pass instance which includes a
subpass dependency is submitted to a queue, it defines a memory
dependency between the subpasses identified by srcSubpass
and
dstSubpass
.
If srcSubpass
is equal to
SUBPASS_EXTERNAL
, the first
synchronization scope
includes commands that occur earlier in
submission order
than the cmdBeginRenderPass
used
to begin the render pass instance. Otherwise, the first set of commands
includes all commands submitted as part of the subpass instance
identified by srcSubpass
and any load, store or multisample resolve
operations on attachments used in srcSubpass
. In either case, the
first synchronization scope is limited to operations on the pipeline
stages determined by the
source stage mask
specified by srcStageMask
.
If dstSubpass
is equal to
SUBPASS_EXTERNAL
, the second
synchronization scope
includes commands that occur later in
submission order
than the cmdEndRenderPass
used to
end the render pass instance. Otherwise, the second set of commands
includes all commands submitted as part of the subpass instance
identified by dstSubpass
and any load, store or multisample resolve
operations on attachments used in dstSubpass
. In either case, the
second synchronization scope is limited to operations on the pipeline
stages determined by the
destination stage mask
specified by dstStageMask
.
The first
access scope
is limited to access in the pipeline stages determined by the
source stage mask
specified by srcStageMask
. It is also limited to access types in the
source access mask
specified by srcAccessMask
.
The second
access scope
is limited to access in the pipeline stages determined by the
destination stage mask
specified by dstStageMask
. It is also limited to access types in the
destination access mask
specified by dstAccessMask
.
The availability and visibility operations defined by a subpass dependency affect the execution of image layout transitions within the render pass.
Note
For non-attachment resources, the memory dependency expressed by subpass
dependency is nearly identical to that of a
MemoryBarrier
(with matching srcAccessMask
and dstAccessMask
parameters) submitted as a part of a
cmdPipelineBarrier
(with matching
srcStageMask
and dstStageMask
parameters). The only difference being
that its scopes are limited to the identified subpasses rather than
potentially affecting everything before and after.
For attachments however, subpass dependencies work more like a
ImageMemoryBarrier
defined similarly to the
MemoryBarrier
above, the queue family indices
set to QUEUE_FAMILY_IGNORED
, and layouts as
follows:
- The equivalent to
oldLayout
is the attachment’s layout according to the subpass description forsrcSubpass
. - The equivalent to
newLayout
is the attachment’s layout according to the subpass description fordstSubpass
.
Valid Usage
- If the
geometry shaders
feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the
geometry shaders
feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the
tessellation shaders
feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- If the
tessellation shaders
feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
srcSubpass
must be less than or equal todstSubpass
, unless one of them isSUBPASS_EXTERNAL
, to avoid cyclic dependencies and ensure a valid execution ordersrcSubpass
anddstSubpass
must not both be equal toSUBPASS_EXTERNAL
- If
srcSubpass
is equal todstSubpass
and not all of the stages insrcStageMask
anddstStageMask
are framebuffer-space stages, the logically latest pipeline stage insrcStageMask
must be logically earlier than or equal to the logically earliest pipeline stage indstStageMask
- Any access flag included in
srcAccessMask
must be supported by one of the pipeline stages insrcStageMask
, as specified in the table of supported access types - Any access flag included in
dstAccessMask
must be supported by one of the pipeline stages indstStageMask
, as specified in the table of supported access types - If
srcSubpass
equalsdstSubpass
, andsrcStageMask
anddstStageMask
both include a framebuffer-space stage, thendependencyFlags
must includeDEPENDENCY_BY_REGION_BIT
- If
dependencyFlags
includesDEPENDENCY_VIEW_LOCAL_BIT
,srcSubpass
must not be equal toSUBPASS_EXTERNAL
- If
dependencyFlags
includesDEPENDENCY_VIEW_LOCAL_BIT
,dstSubpass
must not be equal toSUBPASS_EXTERNAL
- If
srcSubpass
equalsdstSubpass
and that subpass has more than one bit set in the view mask, thendependencyFlags
must includeDEPENDENCY_VIEW_LOCAL_BIT
- If the
mesh shaders
feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the
task shaders
feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
- If the
mesh shaders
feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the
task shaders
feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
Valid Usage (Implicit)
srcStageMask
must be a valid combination ofPipelineStageFlagBits
values
srcStageMask
must not be0
dstStageMask
must be a valid combination ofPipelineStageFlagBits
valuesdstStageMask
must not be0
srcAccessMask
must be a valid combination ofAccessFlagBits
valuesdstAccessMask
must be a valid combination ofAccessFlagBits
valuesdependencyFlags
must be a valid combination ofDependencyFlagBits
values
See Also
AccessFlags
,
DependencyFlags
,
PipelineStageFlags
,
RenderPassCreateInfo
SubpassDependency | |
|
Instances
data RenderPassCreateInfo (es :: [Type]) Source #
VkRenderPassCreateInfo - Structure specifying parameters of a newly created render pass
Description
Note
Care should be taken to avoid a data race here; if any subpasses access attachments with overlapping memory locations, and one of those accesses is a write, a subpass dependency needs to be included between them.
Valid Usage
- If the
attachment
member of any element ofpInputAttachments
,pColorAttachments
,pResolveAttachments
orpDepthStencilAttachment
, or any element ofpPreserveAttachments
in any element ofpSubpasses
is notATTACHMENT_UNUSED
, it must be less thanattachmentCount
- For any member of
pAttachments
with aloadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
orIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
- For any member of
pAttachments
with astencilLoadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
orIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
- For any member of
pAttachments
with aloadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
- For any member of
pAttachments
with astencilLoadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
- If the
pNext
chain includes aRenderPassInputAttachmentAspectCreateInfo
structure, thesubpass
member of each element of itspAspectReferences
member must be less thansubpassCount
- If the
pNext
chain includes aRenderPassInputAttachmentAspectCreateInfo
structure, theinputAttachmentIndex
member of each element of itspAspectReferences
member must be less than the value ofinputAttachmentCount
in the member ofpSubpasses
identified by itssubpass
member - If the
pNext
chain includes aRenderPassInputAttachmentAspectCreateInfo
structure, for any element of thepInputAttachments
member of any element ofpSubpasses
where theattachment
member is notATTACHMENT_UNUSED
, theaspectMask
member of the corresponding element ofRenderPassInputAttachmentAspectCreateInfo
::pAspectReferences
must only include aspects that are present in images of the format specified by the element ofpAttachments
atattachment
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, and itssubpassCount
member is not zero, that member must be equal to the value ofsubpassCount
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, if itsdependencyCount
member is not zero, it must be equal todependencyCount
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, for each non-zero element ofpViewOffsets
, thesrcSubpass
anddstSubpass
members ofpDependencies
at the same index must not be equal - If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, for any element ofpDependencies
with adependencyFlags
member that does not includeDEPENDENCY_VIEW_LOCAL_BIT
, the corresponding element of thepViewOffsets
member of thatRenderPassMultiviewCreateInfo
instance must be0
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, elements of itspViewMasks
member must either all be0
, or all not be0
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, and each element of itspViewMasks
member is0
, thedependencyFlags
member of each element ofpDependencies
must not includeDEPENDENCY_VIEW_LOCAL_BIT
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, and each element of itspViewMasks
member is0
,correlatedViewMaskCount
must be0
- If the
pNext
chain includes aRenderPassMultiviewCreateInfo
structure, each element of itspViewMask
member must not have a bit set at an index greater than or equal toPhysicalDeviceLimits
::maxFramebufferLayers
- For any element of
pDependencies
, if thesrcSubpass
is notSUBPASS_EXTERNAL
, all stage flags included in thesrcStageMask
member of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPoint
member of the source subpass - For any element of
pDependencies
, if thedstSubpass
is notSUBPASS_EXTERNAL
, all stage flags included in thedstStageMask
member of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPoint
member of the destination subpass - The
srcSubpass
member of each element ofpDependencies
must be less thansubpassCount
- The
dstSubpass
member of each element ofpDependencies
must be less thansubpassCount
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofRenderPassFragmentDensityMapCreateInfoEXT
,RenderPassInputAttachmentAspectCreateInfo
, orRenderPassMultiviewCreateInfo
- The
sType
value of each struct in thepNext
chain must be unique flags
must be a valid combination ofRenderPassCreateFlagBits
values- If
attachmentCount
is not0
,pAttachments
must be a valid pointer to an array ofattachmentCount
validAttachmentDescription
structures pSubpasses
must be a valid pointer to an array ofsubpassCount
validSubpassDescription
structures- If
dependencyCount
is not0
,pDependencies
must be a valid pointer to an array ofdependencyCount
validSubpassDependency
structures subpassCount
must be greater than0
See Also
AttachmentDescription
,
RenderPassCreateFlags
,
StructureType
, SubpassDependency
,
SubpassDescription
, createRenderPass
RenderPassCreateInfo | |
|
Instances
data FramebufferCreateInfo (es :: [Type]) Source #
VkFramebufferCreateInfo - Structure specifying parameters of a newly created framebuffer
Description
Applications must ensure that all accesses to memory that backs image subresources used as attachments in a given renderpass instance either happen-before the load operations for those attachments, or happen-after the store operations for those attachments.
For depth/stencil attachments, each aspect can be used separately as
attachments and non-attachments as long as the non-attachment accesses
are also via an image subresource in either the
IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
layout or the
IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
layout, and the attachment resource uses whichever of those two layouts
the image accesses do not. Use of non-attachment aspects in this case is
only well defined if the attachment is used in the subpass where the
non-attachment access is being made, or the layout of the image
subresource is constant throughout the entire render pass instance,
including the initialLayout
and finalLayout
.
Note
These restrictions mean that the render pass has full knowledge of all uses of all of the attachments, so that the implementation is able to make correct decisions about when and how to perform layout transitions, when to overlap execution of subpasses, etc.
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
.
Valid Usage
attachmentCount
must be equal to the attachment count specified inrenderPass
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, andattachmentCount
is not0
,pAttachments
must be a valid pointer to an array ofattachmentCount
validImageView
handles - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is used as a color attachment or resolve attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_COLOR_ATTACHMENT_BIT
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is used as a depth/stencil attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is used as a depth/stencil resolve attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is used as an input attachment byrenderPass
must have been created with ausage
value includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
- Each element of
pAttachments
that is used as a fragment density map attachment byrenderPass
must not have been created with aflags
value includingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
- If
renderPass
has a fragment density map attachment and non-subsample image feature is not enabled, each element ofpAttachments
must have been created with aflags
value includingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
unless that element is the fragment density map attachment - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
must have been created with aFormat
value that matches theFormat
specified by the correspondingAttachmentDescription
inrenderPass
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
must have been created with asamples
value that matches thesamples
value specified by the correspondingAttachmentDescription
inrenderPass
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
must have dimensions at least as large as the corresponding framebuffer dimension except for any element that is referenced byfragmentDensityMapAttachment
- If
renderPass
was specified with non-zero view masks, each element ofpAttachments
that is not referenced byfragmentDensityMapAttachment
must have alayerCount
greater than the index of the most significant bit set in any of those view masks - If
renderPass
was specified with non-zero view masks, each element ofpAttachments
that is referenced byfragmentDensityMapAttachment
must have alayerCount
equal to1
or greater than the index of the most significant bit set in any of those view masks - If
renderPass
was not specified with non-zero view masks, each element ofpAttachments
that is referenced byfragmentDensityMapAttachment
must have alayerCount
equal to1
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, an element ofpAttachments
that is referenced byfragmentDensityMapAttachment
must have a width at least as large as \(\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\rceil\) - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, an element ofpAttachments
that is referenced byfragmentDensityMapAttachment
must have a height at least as large as \(\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\rceil\) - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
must only specify a single mip level - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
must have been created with the identity swizzle width
must be greater than0
width
must be less than or equal toPhysicalDeviceLimits
::maxFramebufferWidth
height
must be greater than0
height
must be less than or equal toPhysicalDeviceLimits
::maxFramebufferHeight
layers
must be greater than0
layers
must be less than or equal toPhysicalDeviceLimits
::maxFramebufferLayers
- If
renderPass
was specified with non-zero view masks,layers
must be1
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, andattachmentCount
is not 0,pAttachments
must be a valid pointer to an array ofattachmentCount
validImageView
handles - If the
imageless framebuffer
feature is not enabled,
flags
must not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, thepNext
chain must include aFramebufferAttachmentsCreateInfo
structure - If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theattachmentImageInfoCount
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain must be equal to either zero orattachmentCount
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, thewidth
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain must be greater than or equal towidth
, except for any element that is referenced byRenderPassFragmentDensityMapCreateInfoEXT
::fragmentDensityMapAttachment
inrenderPass
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theheight
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain must be greater than or equal toheight
, except for any element that is referenced byRenderPassFragmentDensityMapCreateInfoEXT
::fragmentDensityMapAttachment
inrenderPass
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, thewidth
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain that is referenced byRenderPassFragmentDensityMapCreateInfoEXT
::fragmentDensityMapAttachment
inrenderPass
must be greater than or equal to \(\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\rceil\) - If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theheight
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain that is referenced byRenderPassFragmentDensityMapCreateInfoEXT
::fragmentDensityMapAttachment
inrenderPass
must be greater than or equal to \(\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\rceil\) - If multiview is enabled for
renderPass
, andflags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, thelayerCount
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain must be greater than the maximum bit index set in the view mask in the subpasses in which it is used inrenderPass
- If multiview is not enabled for
renderPass
, andflags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, thelayerCount
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain must be greater than or equal tolayers
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theusage
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain that refers to an attachment used as a color attachment or resolve attachment byrenderPass
must includeIMAGE_USAGE_COLOR_ATTACHMENT_BIT
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theusage
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain that refers to an attachment used as a depth/stencil attachment byrenderPass
must includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theusage
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain that refers to an attachment used as a depth/stencil resolve attachment byrenderPass
must includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, theusage
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain that refers to an attachment used as an input attachment byrenderPass
must includeIMAGE_USAGE_INPUT_ATTACHMENT_BIT
- If
flags
includesFRAMEBUFFER_CREATE_IMAGELESS_BIT
, at least one element of thepViewFormats
member of any element of thepAttachmentImageInfos
member of aFramebufferAttachmentsCreateInfo
structure included in thepNext
chain must be equal to the corresponding value ofAttachmentDescription
::format
used to createrenderPass
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofFramebufferAttachmentsCreateInfo
- The
sType
value of each struct in thepNext
chain must be unique flags
must be a valid combination ofFramebufferCreateFlagBits
valuesrenderPass
must be a validRenderPass
handle- Both of
renderPass
, and the elements ofpAttachments
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
FramebufferCreateFlags
,
ImageView
, RenderPass
,
StructureType
, createFramebuffer
FramebufferCreateInfo | |
|