| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Utils.Barrier
Description
Whole-resource pipeline barriers. The transition* helpers issue the
common swapchain-and-attachment transitions as complete
cmdPipelineBarrier calls; imageBarrier is the building block behind
them, exposed for assembling barriers they don't cover (handing a rendered
image to a compute pass, a storage image to a blit, …) — combining several
into one cmdPipelineBarrier call where the stage scopes allow.
bufferBarrier is its buffer-flavoured sibling (a compute-written vertex
SSBO handed to the vertex shader, …).
Synopsis
- transitionColorAttachment :: MonadIO m => CommandBuffer -> Image -> m ()
- transitionPresent :: MonadIO m => CommandBuffer -> Image -> m ()
- transitionDepthAttachment :: MonadIO m => CommandBuffer -> Image -> m ()
- imageBarrier :: ImageAspectFlags -> AccessFlags -> AccessFlags -> ImageLayout -> ImageLayout -> Image -> SomeStruct ImageMemoryBarrier
- bufferBarrier :: AccessFlags -> AccessFlags -> Buffer -> SomeStruct BufferMemoryBarrier
Documentation
transitionColorAttachment :: MonadIO m => CommandBuffer -> Image -> m () Source #
transitionPresent :: MonadIO m => CommandBuffer -> Image -> m () Source #
transitionDepthAttachment :: MonadIO m => CommandBuffer -> Image -> m () Source #
Transition a depth image from UNDEFINED (discarding any previous contents)
to DEPTH_ATTACHMENT_OPTIMAL, ready to be used as a depth attachment. Issue it
before rendering whenever the attachment is about to be cleared on load — every
frame, like the colour images.
The destination scope covers both fragment-test stages with read and write
access: the loadOp clear and late depth writes are writes, the depth test
itself is a read, and all of them must see the transition.
Arguments
| :: ImageAspectFlags | |
| -> AccessFlags | Source access mask. |
| -> AccessFlags | Destination access mask. |
| -> ImageLayout | Old layout; |
| -> ImageLayout | New layout. |
| -> Image | |
| -> SomeStruct ImageMemoryBarrier |
A whole-image memory barrier over the given aspect, from one
(access mask, layout) scope to another, with no queue-family ownership
transfer. The execution scopes (stage masks) live on the enclosing
cmdPipelineBarrier call, shared by every barrier in it.
Arguments
| :: AccessFlags | Source access mask. |
| -> AccessFlags | Destination access mask. |
| -> Buffer | |
| -> SomeStruct BufferMemoryBarrier |
A whole-buffer memory barrier from one access scope to another, with no
queue-family ownership transfer. As with imageBarrier, the execution
scopes (stage masks) live on the enclosing cmdPipelineBarrier call.