Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkAttachmentLoadOp = VkAttachmentLoadOp Int32
- pattern VK_ATTACHMENT_LOAD_OP_LOAD :: VkAttachmentLoadOp
- pattern VK_ATTACHMENT_LOAD_OP_CLEAR :: VkAttachmentLoadOp
- pattern VK_ATTACHMENT_LOAD_OP_DONT_CARE :: VkAttachmentLoadOp
- newtype VkAttachmentStoreOp = VkAttachmentStoreOp Int32
- pattern VK_ATTACHMENT_STORE_OP_STORE :: VkAttachmentStoreOp
- pattern VK_ATTACHMENT_STORE_OP_DONT_CARE :: VkAttachmentStoreOp
- newtype VkPipelineBindPoint = VkPipelineBindPoint Int32
- pattern VK_PIPELINE_BIND_POINT_GRAPHICS :: VkPipelineBindPoint
- pattern VK_PIPELINE_BIND_POINT_COMPUTE :: VkPipelineBindPoint
- newtype VkFramebufferCreateFlags = VkFramebufferCreateFlags VkFlags
- newtype VkRenderPassCreateFlags = VkRenderPassCreateFlags VkFlags
- newtype VkAccessFlagBits = VkAccessFlagBits VkFlags
- pattern VK_ACCESS_INDIRECT_COMMAND_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_INDEX_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_UNIFORM_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_INPUT_ATTACHMENT_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_SHADER_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_SHADER_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_COLOR_ATTACHMENT_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_TRANSFER_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_TRANSFER_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_HOST_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_HOST_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_MEMORY_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_MEMORY_WRITE_BIT :: VkAccessFlagBits
- newtype VkSubpassDescriptionFlagBits = VkSubpassDescriptionFlagBits VkFlags
- newtype VkAttachmentDescriptionFlagBits = VkAttachmentDescriptionFlagBits VkFlags
- pattern VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: VkAttachmentDescriptionFlagBits
- newtype VkDependencyFlagBits = VkDependencyFlagBits VkFlags
- pattern VK_DEPENDENCY_BY_REGION_BIT :: VkDependencyFlagBits
- type VkFramebuffer = Ptr VkFramebuffer_T
- vkCreateFramebuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkFramebufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pFramebuffer" ::: Ptr VkFramebuffer) -> IO VkResult
- vkDestroyFramebuffer :: ("device" ::: VkDevice) -> ("framebuffer" ::: VkFramebuffer) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkCreateRenderPass :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkRenderPassCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pRenderPass" ::: Ptr VkRenderPass) -> IO VkResult
- vkDestroyRenderPass :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkGetRenderAreaGranularity :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pGranularity" ::: Ptr VkExtent2D) -> IO ()
- data VkAttachmentDescription = VkAttachmentDescription {}
- data VkAttachmentReference = VkAttachmentReference {}
- data VkSubpassDescription = VkSubpassDescription {
- vkFlags :: VkSubpassDescriptionFlags
- vkPipelineBindPoint :: VkPipelineBindPoint
- vkInputAttachmentCount :: Word32
- vkPInputAttachments :: Ptr VkAttachmentReference
- vkColorAttachmentCount :: Word32
- vkPColorAttachments :: Ptr VkAttachmentReference
- vkPResolveAttachments :: Ptr VkAttachmentReference
- vkPDepthStencilAttachment :: Ptr VkAttachmentReference
- vkPreserveAttachmentCount :: Word32
- vkPPreserveAttachments :: Ptr Word32
- data VkSubpassDependency = VkSubpassDependency {}
- data VkRenderPassCreateInfo = VkRenderPassCreateInfo {}
- data VkFramebufferCreateInfo = VkFramebufferCreateInfo {}
- type VkAccessFlags = VkAccessFlagBits
- type VkSubpassDescriptionFlags = VkSubpassDescriptionFlagBits
- type VkAttachmentDescriptionFlags = VkAttachmentDescriptionFlagBits
- type VkDependencyFlags = VkDependencyFlagBits
Documentation
newtype VkAttachmentLoadOp Source #
VkAttachmentLoadOp - Specify how contents of an attachment are treated at the beginning of a subpass
See Also
Instances
pattern VK_ATTACHMENT_LOAD_OP_LOAD :: VkAttachmentLoadOp Source #
VK_ATTACHMENT_LOAD_OP_LOAD
specifies that the previous contents of the
image within the render area will be preserved. For attachments with a
depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT
.
pattern VK_ATTACHMENT_LOAD_OP_CLEAR :: VkAttachmentLoadOp Source #
VK_ATTACHMENT_LOAD_OP_CLEAR
specifies that the contents within the
render area will be cleared to a uniform value, which is specified when
a render pass instance is begun. For attachments with a depth/stencil
format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
.
pattern VK_ATTACHMENT_LOAD_OP_DONT_CARE :: VkAttachmentLoadOp Source #
VK_ATTACHMENT_LOAD_OP_DONT_CARE
specifies that the previous contents
within the area need not be preserved; the contents of the attachment
will be undefined inside the render area. For attachments with a
depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
.
newtype VkAttachmentStoreOp Source #
VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of a subpass
See Also
Instances
pattern VK_ATTACHMENT_STORE_OP_STORE :: VkAttachmentStoreOp Source #
VK_ATTACHMENT_STORE_OP_STORE
specifies the contents generated during
the render pass and within the render area are written to memory. For
attachments with a depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
.
pattern VK_ATTACHMENT_STORE_OP_DONT_CARE :: VkAttachmentStoreOp Source #
VK_ATTACHMENT_STORE_OP_DONT_CARE
specifies the contents within the
render area are not needed after rendering, and may be discarded; the
contents of the attachment will be undefined inside the render area. For
attachments with a depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
.
newtype VkPipelineBindPoint Source #
VkPipelineBindPoint - Specify the bind point of a pipeline object to a command buffer
See Also
VkDescriptorUpdateTemplateCreateInfo
,
VkIndirectCommandsLayoutCreateInfoNVX
,
VkSubpassDescription
,
vkCmdBindDescriptorSets
,
vkCmdBindPipeline
,
vkCmdPushDescriptorSetKHR
Instances
pattern VK_PIPELINE_BIND_POINT_GRAPHICS :: VkPipelineBindPoint Source #
VK_PIPELINE_BIND_POINT_GRAPHICS
specifies binding as a graphics
pipeline.
pattern VK_PIPELINE_BIND_POINT_COMPUTE :: VkPipelineBindPoint Source #
VK_PIPELINE_BIND_POINT_COMPUTE
specifies binding as a compute
pipeline.
newtype VkFramebufferCreateFlags Source #
VkFramebufferCreateFlags - Reserved for future use
Description
VkFramebufferCreateFlags
is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Instances
newtype VkRenderPassCreateFlags Source #
VkRenderPassCreateFlags - Reserved for future use
Description
VkRenderPassCreateFlags
is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Instances
newtype VkAccessFlagBits Source #
VkAccessFlagBits - Bitmask specifying memory access types that will participate in a memory dependency
Description
VK_ACCESS_INDIRECT_COMMAND_READ_BIT
specifies read access to an indirect command structure read as part of an indirect drawing or dispatch command.
VK_ACCESS_INDEX_READ_BIT
specifies read access to an index buffer as part of an indexed drawing command, bound byvkCmdBindIndexBuffer
.VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT
specifies read access to a vertex buffer as part of a drawing command, bound byvkCmdBindVertexBuffers
.VK_ACCESS_UNIFORM_READ_BIT
specifies read access to a uniform buffer.VK_ACCESS_INPUT_ATTACHMENT_READ_BIT
specifies read access to an input attachment within a render pass during fragment shading.VK_ACCESS_SHADER_READ_BIT
specifies read access to a storage buffer, uniform texel buffer, storage texel buffer, sampled image, or storage image.VK_ACCESS_SHADER_WRITE_BIT
specifies write access to a storage buffer, storage texel buffer, or storage image.VK_ACCESS_COLOR_ATTACHMENT_READ_BIT
specifies read access to a color attachment, such as via blending, logic operations, or via certain subpass load operations. It does not include advanced blend operations.VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT
is similar toVK_ACCESS_COLOR_ATTACHMENT_READ_BIT
, but also includes advanced blend operations.VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT
specifies write access to a color or resolve attachment during a render pass or via certain subpass load and store operations.VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
specifies read access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load operations.VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
specifies write access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load and store operations.VK_ACCESS_TRANSFER_READ_BIT
specifies read access to an image or buffer in a copy operation.VK_ACCESS_TRANSFER_WRITE_BIT
specifies write access to an image or buffer in a clear or copy operation.VK_ACCESS_HOST_READ_BIT
specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory.VK_ACCESS_HOST_WRITE_BIT
specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory.VK_ACCESS_MEMORY_READ_BIT
specifies read access via non-specific entities. These entities include the Vulkan device and host, but may also include entities external to the Vulkan device or otherwise not part of the core Vulkan pipeline. When included in a destination access mask, makes all available writes visible to all future read accesses on entities known to the Vulkan device.VK_ACCESS_MEMORY_WRITE_BIT
specifies write access via non-specific entities. These entities include the Vulkan device and host, but may also include entities external to the Vulkan device or otherwise not part of the core Vulkan pipeline. When included in a source access mask, all writes that are performed by entities known to the Vulkan device are made available. When included in a destination access mask, makes all available writes visible to all future write accesses on entities known to the Vulkan device.VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX
specifies reads fromVkBuffer
inputs tovkCmdProcessCommandsNVX
.VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX
specifies writes to the target command buffer invkCmdProcessCommandsNVX
.
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.
Access flag | Supported pipeline stages |
---|---|
VK_ACCESS_INDIRECT_COMMAND_READ_BIT | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT |
VK_ACCESS_INDEX_READ_BIT | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |
VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |
VK_ACCESS_UNIFORM_READ_BIT
| VK_PIPELINE_STAGE_VERTEX_SHADER_BIT ,
VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT ,
VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT ,
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT ,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT , or
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT |
VK_ACCESS_INPUT_ATTACHMENT_READ_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
VK_ACCESS_SHADER_READ_BIT
| VK_PIPELINE_STAGE_VERTEX_SHADER_BIT ,
VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT ,
VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT ,
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT ,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT , or
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT |
VK_ACCESS_SHADER_WRITE_BIT
| VK_PIPELINE_STAGE_VERTEX_SHADER_BIT ,
VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT ,
VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT ,
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT ,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT , or
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT |
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT |
VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT |
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT |
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
| VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT , or
VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT |
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
| VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT , or
VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT |
VK_ACCESS_TRANSFER_READ_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT |
VK_ACCESS_TRANSFER_WRITE_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT |
VK_ACCESS_HOST_READ_BIT | VK_PIPELINE_STAGE_HOST_BIT |
VK_ACCESS_HOST_WRITE_BIT | VK_PIPELINE_STAGE_HOST_BIT |
VK_ACCESS_MEMORY_READ_BIT | N/A |
VK_ACCESS_MEMORY_WRITE_BIT | N/A |
VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX |
VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX | VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX |
Supported access types
If a memory object does not have the
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
property, then
vkFlushMappedMemoryRanges
must be
called in order to guarantee that writes to the memory object from the
host are made visible to the VK_ACCESS_HOST_WRITE_BIT
access
type,
where it can be further made available to the device by
synchronization
commands.
Similarly,
vkInvalidateMappedMemoryRanges
must be
called to guarantee that writes which are visible to the
VK_ACCESS_HOST_READ_BIT
access
type
are made visible to host operations.
If the memory object does have the
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
property flag, writes to the
memory object from the host are automatically made visible to the
VK_ACCESS_HOST_WRITE_BIT
access
type.
Similarly, writes made visible to the VK_ACCESS_HOST_READ_BIT
access
type
are automatically made visible to the host.
Note
The vkQueueSubmit
command automatically
guarantees that host writes flushed to @VK_ACCESS_HOST_WRITE_BIT@ are
made
available
if they were flushed before the command executed, so in most cases an
explicit memory barrier is not needed for this case. In the few
circumstances where a submit does not occur between the host write and
the device read access, writes can be made available by using an
explicit memory barrier.
See Also
Instances
pattern VK_ACCESS_INDEX_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_UNIFORM_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_SHADER_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_SHADER_WRITE_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_TRANSFER_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_TRANSFER_WRITE_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_HOST_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_HOST_WRITE_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_MEMORY_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_MEMORY_WRITE_BIT :: VkAccessFlagBits Source #
newtype VkSubpassDescriptionFlagBits Source #
VkSubpassDescriptionFlagBits - Bitmask specifying usage of a subpass
See Also
Instances
newtype VkAttachmentDescriptionFlagBits Source #
VkAttachmentDescriptionFlagBits - Bitmask specifying additional properties of an attachment
See Also
Instances
pattern VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: VkAttachmentDescriptionFlagBits Source #
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
specifies that the attachment
aliases the same device memory as other attachments.
newtype VkDependencyFlagBits Source #
VkDependencyFlagBits - Bitmask specifying how execution and memory dependencies are formed
See Also
Instances
pattern VK_DEPENDENCY_BY_REGION_BIT :: VkDependencyFlagBits Source #
VK_DEPENDENCY_BY_REGION_BIT
specifies that dependencies will be
framebuffer-local.
type VkFramebuffer = Ptr VkFramebuffer_T Source #
VkFramebuffer - Opaque handle to a framebuffer object
See Also
VkCommandBufferInheritanceInfo
,
VkRenderPassBeginInfo
,
vkCreateFramebuffer
, vkDestroyFramebuffer
vkCreateFramebuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkFramebufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pFramebuffer" ::: Ptr VkFramebuffer) -> IO VkResult Source #
vkCreateFramebuffer - Create a new framebuffer object
Parameters
device
is the logical device that creates the framebuffer.
pCreateInfo
points to aVkFramebufferCreateInfo
structure which describes additional information about framebuffer creation.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pFramebuffer
points to aVkFramebuffer
handle in which the resulting framebuffer object is returned.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkFramebufferCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pFramebuffer
must be a valid pointer to aVkFramebuffer
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks
,
VkDevice
, VkFramebuffer
,
VkFramebufferCreateInfo
vkDestroyFramebuffer :: ("device" ::: VkDevice) -> ("framebuffer" ::: VkFramebuffer) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> 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
VkAllocationCallbacks
were provided whenframebuffer
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenframebuffer
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
framebuffer
is notVK_NULL_HANDLE
,framebuffer
must be a validVkFramebuffer
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
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
vkCreateRenderPass :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkRenderPassCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pRenderPass" ::: Ptr VkRenderPass) -> IO VkResult Source #
vkCreateRenderPass - Create a new render pass object
Parameters
device
is the logical device that creates the render pass.
pCreateInfo
is a pointer to an instance of theVkRenderPassCreateInfo
structure that describes the parameters of the render pass.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pRenderPass
points to aVkRenderPass
handle in which the resulting render pass object is returned.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkRenderPassCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pRenderPass
must be a valid pointer to aVkRenderPass
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks
,
VkDevice
,
VkRenderPass
, VkRenderPassCreateInfo
vkDestroyRenderPass :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> 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
VkAllocationCallbacks
were provided whenrenderPass
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenrenderPass
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
renderPass
is notVK_NULL_HANDLE
,renderPass
must be a validVkRenderPass
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
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
vkGetRenderAreaGranularity :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pGranularity" ::: Ptr VkExtent2D) -> IO () 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
points to aVkExtent2D
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 returnedVkExtent2D
(the horizontal granularity). - the
offset.y
member inrenderArea
is a multiple of theheight
of the returnedVkExtent2D
(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 theVkRenderPassBeginInfo
. - either the
offset.height
member inrenderArea
is a multiple of the vertical granularity oroffset.y
+offset.height
is equal to theheight
of theframebuffer
in theVkRenderPassBeginInfo
.
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 validVkDevice
handle
renderPass
must be a validVkRenderPass
handlepGranularity
must be a valid pointer to aVkExtent2D
structurerenderPass
must have been created, allocated, or retrieved fromdevice
See Also
data VkAttachmentDescription 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
VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
pipeline stage. Load
operations for attachments with a color format execute in the
VK_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
VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
pipeline stage. Store
operations for attachments with a color format execute in the
VK_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 VK_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.
Valid Usage
finalLayout
must not beVK_IMAGE_LAYOUT_UNDEFINED
orVK_IMAGE_LAYOUT_PREINITIALIZED
Valid Usage (Implicit)
flags
must be a valid combination ofVkAttachmentDescriptionFlagBits
values
format
must be a validVkFormat
valuesamples
must be a validVkSampleCountFlagBits
valueloadOp
must be a validVkAttachmentLoadOp
valuestoreOp
must be a validVkAttachmentStoreOp
valuestencilLoadOp
must be a validVkAttachmentLoadOp
valuestencilStoreOp
must be a validVkAttachmentStoreOp
valueinitialLayout
must be a validVkImageLayout
valuefinalLayout
must be a validVkImageLayout
value
See Also
VkAttachmentDescriptionFlags
, VkAttachmentLoadOp
,
VkAttachmentStoreOp
, VkFormat
,
VkImageLayout
, VkRenderPassCreateInfo
,
VkSampleCountFlagBits
VkAttachmentDescription | |
|
Instances
Eq VkAttachmentDescription Source # | |
Show VkAttachmentDescription Source # | |
showsPrec :: Int -> VkAttachmentDescription -> ShowS # show :: VkAttachmentDescription -> String # showList :: [VkAttachmentDescription] -> ShowS # | |
Storable VkAttachmentDescription Source # | |
sizeOf :: VkAttachmentDescription -> Int # alignment :: VkAttachmentDescription -> Int # peekElemOff :: Ptr VkAttachmentDescription -> Int -> IO VkAttachmentDescription # pokeElemOff :: Ptr VkAttachmentDescription -> Int -> VkAttachmentDescription -> IO () # peekByteOff :: Ptr b -> Int -> IO VkAttachmentDescription # pokeByteOff :: Ptr b -> Int -> VkAttachmentDescription -> IO () # peek :: Ptr VkAttachmentDescription -> IO VkAttachmentDescription # poke :: Ptr VkAttachmentDescription -> VkAttachmentDescription -> IO () # |
data VkAttachmentReference Source #
VkAttachmentReference - Structure specifying an attachment reference
Valid Usage
layout
must not beVK_IMAGE_LAYOUT_UNDEFINED
orVK_IMAGE_LAYOUT_PREINITIALIZED
Valid Usage (Implicit)
layout
must be a validVkImageLayout
value
See Also
VkAttachmentReference | |
|
Instances
Eq VkAttachmentReference Source # | |
(==) :: VkAttachmentReference -> VkAttachmentReference -> Bool # (/=) :: VkAttachmentReference -> VkAttachmentReference -> Bool # | |
Show VkAttachmentReference Source # | |
showsPrec :: Int -> VkAttachmentReference -> ShowS # show :: VkAttachmentReference -> String # showList :: [VkAttachmentReference] -> ShowS # | |
Storable VkAttachmentReference Source # | |
sizeOf :: VkAttachmentReference -> Int # alignment :: VkAttachmentReference -> Int # peekElemOff :: Ptr VkAttachmentReference -> Int -> IO VkAttachmentReference # pokeElemOff :: Ptr VkAttachmentReference -> Int -> VkAttachmentReference -> IO () # peekByteOff :: Ptr b -> Int -> IO VkAttachmentReference # pokeByteOff :: Ptr b -> Int -> VkAttachmentReference -> IO () # peek :: Ptr VkAttachmentReference -> IO VkAttachmentReference # poke :: Ptr VkAttachmentReference -> VkAttachmentReference -> IO () # |
data VkSubpassDescription Source #
VkSubpassDescription - Structure specifying a subpass description
Description
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.
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 beVK_PIPELINE_BIND_POINT_GRAPHICS
colorAttachmentCount
must be less than or equal toVkPhysicalDeviceLimits
::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 beVK_ATTACHMENT_LOAD_OP_CLEAR
- If
pResolveAttachments
is notNULL
, for each resolve attachment that does not have the valueVK_ATTACHMENT_UNUSED
, the corresponding color attachment must not have the valueVK_ATTACHMENT_UNUSED
- If
pResolveAttachments
is notNULL
, the sample count of each element ofpColorAttachments
must be anything other thanVK_SAMPLE_COUNT_1_BIT
- Each element of
pResolveAttachments
must have a sample count ofVK_SAMPLE_COUNT_1_BIT
- Each element of
pResolveAttachments
must have the sameVkFormat
as its corresponding color attachment - All attachments in
pColorAttachments
that are notVK_ATTACHMENT_UNUSED
must have the same sample count - All attachments in
pColorAttachments
that are notVK_ATTACHMENT_UNUSED
must have a sample count that is smaller than or equal to the sample count ofpDepthStencilAttachment
if it is notVK_ATTACHMENT_UNUSED
- If any input attachments are
VK_ATTACHMENT_UNUSED
, then any pipelines bound during the subpass must not access those input attachments from the fragment shader - The
attachment
member of each element ofpPreserveAttachments
must not beVK_ATTACHMENT_UNUSED
- Each element of
pPreserveAttachments
must not also be an element of any other member of the subpass description - If any attachment is used as both an input attachment and a color or
depth/stencil attachment, then each use must use the same
layout
- If
flags
includesVK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX
, it must also includeVK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX
.
Valid Usage (Implicit)
flags
must be a valid combination ofVkSubpassDescriptionFlagBits
values
pipelineBindPoint
must be a validVkPipelineBindPoint
value- If
inputAttachmentCount
is not0
,pInputAttachments
must be a valid pointer to an array ofinputAttachmentCount
validVkAttachmentReference
structures - If
colorAttachmentCount
is not0
,pColorAttachments
must be a valid pointer to an array ofcolorAttachmentCount
validVkAttachmentReference
structures - If
colorAttachmentCount
is not0
, andpResolveAttachments
is notNULL
,pResolveAttachments
must be a valid pointer to an array ofcolorAttachmentCount
validVkAttachmentReference
structures - If
pDepthStencilAttachment
is notNULL
,pDepthStencilAttachment
must be a valid pointer to a validVkAttachmentReference
structure - If
preserveAttachmentCount
is not0
,pPreserveAttachments
must be a valid pointer to an array ofpreserveAttachmentCount
uint32_t
values
See Also
VkAttachmentReference
, VkPipelineBindPoint
,
VkRenderPassCreateInfo
, VkSubpassDescriptionFlags
VkSubpassDescription | |
|
Instances
Eq VkSubpassDescription Source # | |
(==) :: VkSubpassDescription -> VkSubpassDescription -> Bool # (/=) :: VkSubpassDescription -> VkSubpassDescription -> Bool # | |
Show VkSubpassDescription Source # | |
showsPrec :: Int -> VkSubpassDescription -> ShowS # show :: VkSubpassDescription -> String # showList :: [VkSubpassDescription] -> ShowS # | |
Storable VkSubpassDescription Source # | |
sizeOf :: VkSubpassDescription -> Int # alignment :: VkSubpassDescription -> Int # peekElemOff :: Ptr VkSubpassDescription -> Int -> IO VkSubpassDescription # pokeElemOff :: Ptr VkSubpassDescription -> Int -> VkSubpassDescription -> IO () # peekByteOff :: Ptr b -> Int -> IO VkSubpassDescription # pokeByteOff :: Ptr b -> Int -> VkSubpassDescription -> IO () # peek :: Ptr VkSubpassDescription -> IO VkSubpassDescription # poke :: Ptr VkSubpassDescription -> VkSubpassDescription -> IO () # |
data VkSubpassDependency Source #
VkSubpassDependency - Structure specifying a subpass dependency
Description
If srcSubpass
is equal to dstSubpass
then the VkSubpassDependency
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 VK_SUBPASS_EXTERNAL
, the first
synchronization
scope
includes commands that occur earlier in submission
order
than the
vkCmdBeginRenderPass
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 VK_SUBPASS_EXTERNAL
, the second
synchronization
scope
includes commands that occur later in submission
order
than the
vkCmdEndRenderPass
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
VkMemoryBarrier
(with
matching srcAccessMask
/dstAccessMask
parameters) submitted as a
part of a
vkCmdPipelineBarrier
(with matching srcStageMask
/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 an
VkImageMemoryBarrier
defined similarly to the
VkMemoryBarrier
above,
the queue family indices set to VK_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
srcSubpass
is notVK_SUBPASS_EXTERNAL
,srcStageMask
must not includeVK_PIPELINE_STAGE_HOST_BIT
- If
dstSubpass
is notVK_SUBPASS_EXTERNAL
,dstStageMask
must not includeVK_PIPELINE_STAGE_HOST_BIT
- If the geometry
shaders
feature is not enabled,
srcStageMask
must not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the geometry
shaders
feature is not enabled,
dstStageMask
must not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the tessellation
shaders
feature is not enabled,
srcStageMask
must not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- If the tessellation
shaders
feature is not enabled,
dstStageMask
must not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
srcSubpass
must be less than or equal todstSubpass
, unless one of them isVK_SUBPASS_EXTERNAL
, to avoid cyclic dependencies and ensure a valid execution ordersrcSubpass
anddstSubpass
must not both be equal toVK_SUBPASS_EXTERNAL
- If
srcSubpass
is equal todstSubpass
,srcStageMask
anddstStageMask
must only contain one ofVK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
,VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT
,VK_PIPELINE_STAGE_VERTEX_INPUT_BIT
,VK_PIPELINE_STAGE_VERTEX_SHADER_BIT
,VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
,VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
,VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT
,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT
,VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
,VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
,VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
,VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
, orVK_PIPELINE_STAGE_ALL_GRAPHICS_BIT
- 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
dependencyFlags
includesVK_DEPENDENCY_VIEW_LOCAL_BIT
, then bothsrcSubpass
anddstSubpass
must not equalVK_SUBPASS_EXTERNAL
- If
dependencyFlags
includesVK_DEPENDENCY_VIEW_LOCAL_BIT
, then the render pass must have multiview enabled - If
srcSubpass
equalsdstSubpass
and that subpass has more than one bit set in the view mask, thendependencyFlags
must includeVK_DEPENDENCY_VIEW_LOCAL_BIT
Valid Usage (Implicit)
srcStageMask
must be a valid combination ofVkPipelineStageFlagBits
values
srcStageMask
must not be0
dstStageMask
must be a valid combination ofVkPipelineStageFlagBits
valuesdstStageMask
must not be0
srcAccessMask
must be a valid combination ofVkAccessFlagBits
valuesdstAccessMask
must be a valid combination ofVkAccessFlagBits
valuesdependencyFlags
must be a valid combination ofVkDependencyFlagBits
values
See Also
VkAccessFlags
, VkDependencyFlags
,
VkPipelineStageFlags
,
VkRenderPassCreateInfo
VkSubpassDependency | |
|
Instances
Eq VkSubpassDependency Source # | |
(==) :: VkSubpassDependency -> VkSubpassDependency -> Bool # (/=) :: VkSubpassDependency -> VkSubpassDependency -> Bool # | |
Show VkSubpassDependency Source # | |
showsPrec :: Int -> VkSubpassDependency -> ShowS # show :: VkSubpassDependency -> String # showList :: [VkSubpassDependency] -> ShowS # | |
Storable VkSubpassDependency Source # | |
sizeOf :: VkSubpassDependency -> Int # alignment :: VkSubpassDependency -> Int # peekElemOff :: Ptr VkSubpassDependency -> Int -> IO VkSubpassDependency # pokeElemOff :: Ptr VkSubpassDependency -> Int -> VkSubpassDependency -> IO () # peekByteOff :: Ptr b -> Int -> IO VkSubpassDependency # pokeByteOff :: Ptr b -> Int -> VkSubpassDependency -> IO () # peek :: Ptr VkSubpassDependency -> IO VkSubpassDependency # poke :: Ptr VkSubpassDependency -> VkSubpassDependency -> IO () # |
data VkRenderPassCreateInfo Source #
VkRenderPassCreateInfo - Structure specifying parameters of a newly created render pass
Valid Usage
- If any two subpasses operate on attachments with overlapping ranges
of the same
VkDeviceMemory
object, and at least one subpass writes to that area ofVkDeviceMemory
, a subpass dependency must be included (either directly or via some intermediate subpasses) between them
- If the
attachment
member of any element ofpInputAttachments
,pColorAttachments
,pResolveAttachments
orpDepthStencilAttachment
, or the attachment indexed by any element ofpPreserveAttachments
in any element ofpSubpasses
is bound to a range of aVkDeviceMemory
object that overlaps with any other attachment in any subpass (including the same subpass), theVkAttachmentDescription
structures describing them must includeVK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
inflags
- If the
attachment
member of any element ofpInputAttachments
,pColorAttachments
,pResolveAttachments
orpDepthStencilAttachment
, or any element ofpPreserveAttachments
in any element ofpSubpasses
is notVK_ATTACHMENT_UNUSED
, it must be less thanattachmentCount
- The value of each element of the
pPreserveAttachments
member in each element ofpSubpasses
must not beVK_ATTACHMENT_UNUSED
- For any member of
pAttachments
with aloadOp
equal toVK_ATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toVK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
orVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
. - For any member of
pAttachments
with aloadOp
equal toVK_ATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
. - For any member of
pAttachments
with astencilLoadOp
equal toVK_ATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
. - For any element of
pDependencies
, if thesrcSubpass
is notVK_SUBPASS_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 notVK_SUBPASS_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 source subpass.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_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 ofVkRenderPassInputAttachmentAspectCreateInfo
orVkRenderPassMultiviewCreateInfo
- Each
sType
member in thepNext
chain must be unique flags
must be0
- If
attachmentCount
is not0
,pAttachments
must be a valid pointer to an array ofattachmentCount
validVkAttachmentDescription
structures pSubpasses
must be a valid pointer to an array ofsubpassCount
validVkSubpassDescription
structures- If
dependencyCount
is not0
,pDependencies
must be a valid pointer to an array ofdependencyCount
validVkSubpassDependency
structures subpassCount
must be greater than0
See Also
VkAttachmentDescription
, VkRenderPassCreateFlags
,
VkStructureType
, VkSubpassDependency
,
VkSubpassDescription
, vkCreateRenderPass
VkRenderPassCreateInfo | |
|
Instances
Eq VkRenderPassCreateInfo Source # | |
Show VkRenderPassCreateInfo Source # | |
showsPrec :: Int -> VkRenderPassCreateInfo -> ShowS # show :: VkRenderPassCreateInfo -> String # showList :: [VkRenderPassCreateInfo] -> ShowS # | |
Storable VkRenderPassCreateInfo Source # | |
sizeOf :: VkRenderPassCreateInfo -> Int # alignment :: VkRenderPassCreateInfo -> Int # peekElemOff :: Ptr VkRenderPassCreateInfo -> Int -> IO VkRenderPassCreateInfo # pokeElemOff :: Ptr VkRenderPassCreateInfo -> Int -> VkRenderPassCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkRenderPassCreateInfo # pokeByteOff :: Ptr b -> Int -> VkRenderPassCreateInfo -> IO () # peek :: Ptr VkRenderPassCreateInfo -> IO VkRenderPassCreateInfo # poke :: Ptr VkRenderPassCreateInfo -> VkRenderPassCreateInfo -> IO () # |
data VkFramebufferCreateInfo 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
VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
layout or
the VK_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,
and rather use shader side effects such as image stores and atomics to
produce an output. In this case, the subpass continues to use the
width
, height
, and layers
of the framebuffer to define the
dimensions of the rendering area, and the rasterizationSamples
from
each pipeline’s
VkPipelineMultisampleStateCreateInfo
to define the number of samples used in rasterization; however, if
VkPhysicalDeviceFeatures
::variableMultisampleRate
is VK_FALSE
, then all pipelines to be bound with a given
zero-attachment subpass must have the same value for
VkPipelineMultisampleStateCreateInfo
::rasterizationSamples
.
Valid Usage
attachmentCount
must be equal to the attachment count specified inrenderPass
- Each element of
pAttachments
that is used as a color attachment or resolve attachment byrenderPass
must have been created with ausage
value includingVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
- Each element of
pAttachments
that is used as a depth/stencil attachment byrenderPass
must have been created with ausage
value includingVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- Each element of
pAttachments
that is used as an input attachment byrenderPass
must have been created with ausage
value includingVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
- Each element of
pAttachments
must have been created with anVkFormat
value that matches theVkFormat
specified by the correspondingVkAttachmentDescription
inrenderPass
- Each element of
pAttachments
must have been created with asamples
value that matches thesamples
value specified by the correspondingVkAttachmentDescription
inrenderPass
- Each element of
pAttachments
must have dimensions at least as large as the corresponding framebuffer dimension - Each element of
pAttachments
must only specify a single mip level - Each element of
pAttachments
must have been created with the identity swizzle width
must be greater than0
.width
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferWidth
height
must be greater than0
.height
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferHeight
layers
must be greater than0
.layers
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferLayers
- Each element of
pAttachments
that is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
pNext
must beNULL
flags
must be0
renderPass
must be a validVkRenderPass
handle- If
attachmentCount
is not0
,pAttachments
must be a valid pointer to an array ofattachmentCount
validVkImageView
handles - Both of
renderPass
, and the elements ofpAttachments
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkFramebufferCreateFlags
,
VkImageView
,
VkRenderPass
,
VkStructureType
, vkCreateFramebuffer
VkFramebufferCreateInfo | |
|
Instances
Eq VkFramebufferCreateInfo Source # | |
Show VkFramebufferCreateInfo Source # | |
showsPrec :: Int -> VkFramebufferCreateInfo -> ShowS # show :: VkFramebufferCreateInfo -> String # showList :: [VkFramebufferCreateInfo] -> ShowS # | |
Storable VkFramebufferCreateInfo Source # | |
sizeOf :: VkFramebufferCreateInfo -> Int # alignment :: VkFramebufferCreateInfo -> Int # peekElemOff :: Ptr VkFramebufferCreateInfo -> Int -> IO VkFramebufferCreateInfo # pokeElemOff :: Ptr VkFramebufferCreateInfo -> Int -> VkFramebufferCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkFramebufferCreateInfo # pokeByteOff :: Ptr b -> Int -> VkFramebufferCreateInfo -> IO () # peek :: Ptr VkFramebufferCreateInfo -> IO VkFramebufferCreateInfo # poke :: Ptr VkFramebufferCreateInfo -> VkFramebufferCreateInfo -> IO () # |
type VkAccessFlags = VkAccessFlagBits Source #
VkAccessFlags - Bitmask of VkAccessFlagBits
Description
VkAccessFlags
is a bitmask type for setting a mask of zero or more
VkAccessFlagBits
.
See Also
VkAccessFlagBits
,
VkBufferMemoryBarrier
,
VkImageMemoryBarrier
,
VkMemoryBarrier
,
VkSubpassDependency
type VkSubpassDescriptionFlags = VkSubpassDescriptionFlagBits Source #
VkSubpassDescriptionFlags - Bitmask of VkSubpassDescriptionFlagBits
Description
VkSubpassDescriptionFlags
is a bitmask type for setting a mask of zero
or more VkSubpassDescriptionFlagBits
.
See Also
type VkAttachmentDescriptionFlags = VkAttachmentDescriptionFlagBits Source #
VkAttachmentDescriptionFlags - Bitmask of VkAttachmentDescriptionFlagBits
Description
VkAttachmentDescriptionFlags
is a bitmask type for setting a mask of
zero or more VkAttachmentDescriptionFlagBits
.
See Also
type VkDependencyFlags = VkDependencyFlagBits Source #
VkDependencyFlags - Bitmask of VkDependencyFlagBits
Description
VkDependencyFlags
is a bitmask type for setting a mask of zero or more
VkDependencyFlagBits
.
See Also
VkDependencyFlagBits
, VkSubpassDependency
,
vkCmdPipelineBarrier