pub struct FrameSync<'a> {
pub wait: &'a [Semaphore],
pub signal: &'a [Semaphore],
pub presents: bool,
}Expand description
Semaphores a submission waits on and signals.
Grouped rather than passed loose so that adding a timeline value or a second stage mask later changes one type rather than every signature between here and a presentation target.
Vulkan-specific on purpose. The HAL’s own synchronization is a fence and an
exported sync_file, which is what crosses to a display controller; a
swapchain’s semaphores never leave the device and have no counterpart on a
backend that has no swapchain. A Vulkan presentation target using Vulkan
semaphores is not the layering violation that a renderer asking “is this
Vulkan?” would be.
Fields§
§wait: &'a [Semaphore]Waited on before the color attachment is written.
signal: &'a [Semaphore]Signalled when the submission completes.
presents: boolLeave the target in the layout a presentation engine reads from.
Folded into the render pass rather than done as a transition afterwards, and not as an optimization: a separate transition is a separate submission, and nothing orders it after a render that has not been waited for. Doing it here makes the ordering the render pass’s, which is where it can be expressed without a stall.