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
- newtype Framebuffer = Framebuffer Word64
- newtype RenderPass = RenderPass Word64
- newtype AttachmentLoadOp where
- AttachmentLoadOp Int32
- pattern ATTACHMENT_LOAD_OP_LOAD :: AttachmentLoadOp
- pattern ATTACHMENT_LOAD_OP_CLEAR :: AttachmentLoadOp
- pattern ATTACHMENT_LOAD_OP_DONT_CARE :: AttachmentLoadOp
- newtype AttachmentStoreOp where
- newtype PipelineBindPoint where
- newtype RenderPassCreateFlagBits where
- type RenderPassCreateFlags = RenderPassCreateFlagBits
- newtype AccessFlagBits where
- AccessFlagBits Flags
- pattern ACCESS_INDIRECT_COMMAND_READ_BIT :: AccessFlagBits
- pattern ACCESS_INDEX_READ_BIT :: AccessFlagBits
- pattern ACCESS_VERTEX_ATTRIBUTE_READ_BIT :: AccessFlagBits
- pattern ACCESS_UNIFORM_READ_BIT :: AccessFlagBits
- pattern ACCESS_INPUT_ATTACHMENT_READ_BIT :: AccessFlagBits
- pattern ACCESS_SHADER_READ_BIT :: AccessFlagBits
- pattern ACCESS_SHADER_WRITE_BIT :: AccessFlagBits
- pattern ACCESS_COLOR_ATTACHMENT_READ_BIT :: AccessFlagBits
- pattern ACCESS_COLOR_ATTACHMENT_WRITE_BIT :: AccessFlagBits
- pattern ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT :: AccessFlagBits
- pattern ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT :: AccessFlagBits
- pattern ACCESS_TRANSFER_READ_BIT :: AccessFlagBits
- pattern ACCESS_TRANSFER_WRITE_BIT :: AccessFlagBits
- pattern ACCESS_HOST_READ_BIT :: AccessFlagBits
- pattern ACCESS_HOST_WRITE_BIT :: AccessFlagBits
- pattern ACCESS_MEMORY_READ_BIT :: AccessFlagBits
- pattern ACCESS_MEMORY_WRITE_BIT :: AccessFlagBits
- pattern ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV :: AccessFlagBits
- pattern ACCESS_COMMAND_PREPROCESS_READ_BIT_NV :: AccessFlagBits
- pattern ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT :: AccessFlagBits
- pattern ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV :: AccessFlagBits
- pattern ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR :: AccessFlagBits
- pattern ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR :: AccessFlagBits
- pattern ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT :: AccessFlagBits
- pattern ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT :: AccessFlagBits
- pattern ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT :: AccessFlagBits
- pattern ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT :: AccessFlagBits
- pattern ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT :: AccessFlagBits
- type AccessFlags = AccessFlagBits
- newtype AttachmentDescriptionFlagBits where
- type AttachmentDescriptionFlags = AttachmentDescriptionFlagBits
- newtype DependencyFlagBits where
- type DependencyFlags = DependencyFlagBits
- newtype SubpassDescriptionFlagBits where
- SubpassDescriptionFlagBits Flags
- pattern SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM :: SubpassDescriptionFlagBits
- pattern SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM :: SubpassDescriptionFlagBits
- pattern SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX :: SubpassDescriptionFlagBits
- pattern SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX :: SubpassDescriptionFlagBits
- type SubpassDescriptionFlags = SubpassDescriptionFlagBits
- newtype FramebufferCreateFlagBits where
- type FramebufferCreateFlags = FramebufferCreateFlagBits
Documentation
:: forall a io. (Extendss FramebufferCreateInfo a, PokeChain a, MonadIO io) | |
=> Device |
|
-> FramebufferCreateInfo a |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io Framebuffer |
vkCreateFramebuffer - Create a new framebuffer object
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 last argument.
To just extract the pair pass (,)
as the last argument.
:: forall io. MonadIO io | |
=> Device |
|
-> Framebuffer |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyFramebuffer - Destroy a framebuffer object
Valid Usage
- 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
:: forall a io. (Extendss RenderPassCreateInfo a, PokeChain a, MonadIO io) | |
=> Device |
|
-> RenderPassCreateInfo a |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io RenderPass |
vkCreateRenderPass - Create a new render pass object
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 last argument.
To just extract the pair pass (,)
as the last argument.
:: forall io. MonadIO io | |
=> Device |
|
-> RenderPass |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyRenderPass - Destroy a render pass object
Valid Usage
- 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 Source #
:: forall io. MonadIO io | |
=> Device |
|
-> RenderPass |
|
-> io ("granularity" ::: Extent2D) |
vkGetRenderAreaGranularity - Returns the granularity for optimal render area
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
handle -
pGranularity
must be a valid pointer to aExtent2D
structure -
renderPass
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
value -
samples
must be a validSampleCountFlagBits
value -
loadOp
must be a validAttachmentLoadOp
value -
storeOp
must be a validAttachmentStoreOp
value -
stencilLoadOp
must be a validAttachmentLoadOp
value -
stencilStoreOp
must be a validAttachmentStoreOp
value -
initialLayout
must be a validImageLayout
value -
finalLayout
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 image formats whose potential format features contain at leastFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
orFORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
- All attachments
in
pColorAttachments
that are notATTACHMENT_UNUSED
must have image formats whose potential format features containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
- All
attachments in
pResolveAttachments
that are notATTACHMENT_UNUSED
must have image formats whose potential format features containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
- If
pDepthStencilAttachment
is notNULL
and the attachment is notATTACHMENT_UNUSED
then it must have a image format whose potential format 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
- Each attachment must follow the image layout requirements specified for its attachment type
- 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
-
pDepthStencilAttachment
andpColorAttachments
must not contain references to the same attachment
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 order -
srcSubpass
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
values -
dstStageMask
must not be0
-
srcAccessMask
must be a valid combination ofAccessFlagBits
values -
dstAccessMask
must be a valid combination ofAccessFlagBits
values -
dependencyFlags
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
- 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
Other than the exceptions listed below, 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.
The exceptions to the general rule are:
- For depth/stencil attachments, an aspect can be used separately as attachment and non-attachment if both accesses are read-only.
- 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 theIMAGE_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 these cases 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
- 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
that is used as an input, color, resolve, or depth/stencil attachment byrenderPass
must have been created with a VkImageCreateInfo::width
greater than or equal towidth
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is used as an input, color, resolve, or depth/stencil attachment byrenderPass
must have been created with a VkImageCreateInfo::height
greater than or equal toheight
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, each element ofpAttachments
that is used as an input, color, resolve, or depth/stencil attachment byrenderPass
must have been created with a VkImageViewCreateInfo::subresourceRange.pname
:layerCount greater than or equal tolayers
- If
renderPass
was specified with non-zero view masks, each element ofpAttachments
that is used as an input, color, resolve, or depth/stencil attachment byrenderPass
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 \(\left\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\right\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 \(\left\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\right\rceil\) - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, andrenderPass
was specified with non-zero view masks, each element ofpAttachments
that is used as a fragment shading rate attachment byrenderPass
must have alayerCount
that is either1
, or greater than the index of the most significant bit set in any of those view masks - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, andrenderPass
was not specified with non-zero view masks, each element ofpAttachments
that is used as a fragment shading rate attachment byrenderPass
must have alayerCount
that is either1
, or greater thanlayers
- If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, an element ofpAttachments
that is used as a fragment shading rate attachment must have a width at least as large as ⌈width
\texelWidth
⌉, wheretexelWidth
is the largest value ofshadingRateAttachmentTexelSize.width
in aFragmentShadingRateAttachmentInfoKHR
which references that attachment - If
flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT
, an element ofpAttachments
that is used as a fragment shading rate attachment must have a height at least as large as ⌈height
--texelHeight
⌉, wheretexelHeight
is the largest value of
FramebufferCreateInfo | |
|
Instances
newtype Framebuffer Source #
VkFramebuffer - Opaque handle to a framebuffer object
See Also
CommandBufferInheritanceInfo
,
RenderPassBeginInfo
,
createFramebuffer
,
destroyFramebuffer
Instances
newtype RenderPass Source #
VkRenderPass - Opaque handle to a render pass object
See Also
CommandBufferInheritanceInfo
,
FramebufferCreateInfo
,
GraphicsPipelineCreateInfo
,
RenderPassBeginInfo
,
createRenderPass
,
createRenderPass2
,
createRenderPass2KHR
,
destroyRenderPass
,
getRenderAreaGranularity
Instances
newtype AttachmentLoadOp Source #
VkAttachmentLoadOp - Specify how contents of an attachment are treated at the beginning of a subpass
See Also
pattern ATTACHMENT_LOAD_OP_LOAD :: AttachmentLoadOp |
|
pattern ATTACHMENT_LOAD_OP_CLEAR :: AttachmentLoadOp |
|
pattern ATTACHMENT_LOAD_OP_DONT_CARE :: AttachmentLoadOp |
|
Instances
newtype AttachmentStoreOp Source #
VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of a subpass
Description
Note
ATTACHMENT_STORE_OP_DONT_CARE
can cause contents generated during
previous render passes to be discarded before reaching memory, even if
no write to the attachment occurs during the current render pass.
See Also
pattern ATTACHMENT_STORE_OP_STORE :: AttachmentStoreOp |
|
pattern ATTACHMENT_STORE_OP_DONT_CARE :: AttachmentStoreOp |
|
pattern ATTACHMENT_STORE_OP_NONE_QCOM :: AttachmentStoreOp |
|
Instances
newtype PipelineBindPoint Source #
VkPipelineBindPoint - Specify the bind point of a pipeline object to a command buffer
See Also
DescriptorUpdateTemplateCreateInfo
,
GeneratedCommandsInfoNV
,
GeneratedCommandsMemoryRequirementsInfoNV
,
IndirectCommandsLayoutCreateInfoNV
,
SubpassDescription
,
SubpassDescription2
,
cmdBindDescriptorSets
,
cmdBindPipeline
,
cmdBindPipelineShaderGroupNV
,
cmdPushDescriptorSetKHR
pattern PIPELINE_BIND_POINT_GRAPHICS :: PipelineBindPoint |
|
pattern PIPELINE_BIND_POINT_COMPUTE :: PipelineBindPoint |
|
pattern PIPELINE_BIND_POINT_RAY_TRACING_KHR :: PipelineBindPoint |
|
Instances
newtype RenderPassCreateFlagBits Source #
VkRenderPassCreateFlagBits - Bitmask specifying additional properties of a renderpass
See Also
pattern RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM :: RenderPassCreateFlagBits |
|
Instances
newtype AccessFlagBits Source #
VkAccessFlagBits - Bitmask specifying memory access types that will participate in a memory dependency
Description
Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access.
Supported access types
See Also
Instances
type AccessFlags = AccessFlagBits Source #
newtype AttachmentDescriptionFlagBits Source #
VkAttachmentDescriptionFlagBits - Bitmask specifying additional properties of an attachment
See Also
pattern ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: AttachmentDescriptionFlagBits |
|
Instances
newtype DependencyFlagBits Source #
VkDependencyFlagBits - Bitmask specifying how execution and memory dependencies are formed
See Also
pattern DEPENDENCY_BY_REGION_BIT :: DependencyFlagBits |
|
pattern DEPENDENCY_VIEW_LOCAL_BIT :: DependencyFlagBits |
|
pattern DEPENDENCY_DEVICE_GROUP_BIT :: DependencyFlagBits |
|
Instances
type DependencyFlags = DependencyFlagBits Source #
newtype SubpassDescriptionFlagBits Source #
VkSubpassDescriptionFlagBits - Bitmask specifying usage of a subpass
Description
Note
Shader resolve operations allow for custom resolve operations, but overdrawing pixels may have a performance and/or power cost. Furthermore, since the content of any depth stencil attachment or color attachment is undefined at the begining of a shader resolve subpass, any depth testing, stencil testing, or blending operation which sources these undefined values also has undefined result value.
See Also
pattern SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM :: SubpassDescriptionFlagBits |
|
pattern SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM :: SubpassDescriptionFlagBits |
|
pattern SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX :: SubpassDescriptionFlagBits |
|
pattern SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX :: SubpassDescriptionFlagBits |
|
Instances
newtype FramebufferCreateFlagBits Source #
VkFramebufferCreateFlagBits - Bitmask specifying framebuffer properties
See Also
pattern FRAMEBUFFER_CREATE_IMAGELESS_BIT :: FramebufferCreateFlagBits |
|