Toast Engine
Loading...
Searching...
No Matches
renderer::sync::BarrierBatch Class Reference

Skips a barrier only when neither side writes and the layout and next read stages are already covered. More...

#include <gpu_sync.hpp>

Public Member Functions

void image (ImageState &state, Usage next)
 No op for an image that does not exist. The widest usage until the next write avoids read to read barriers.
void image (vk::Image image, const vk::ImageSubresourceRange &range, Usage previous, Usage next)
void buffer (vk::Buffer buffer, Usage previous, Usage next, vk::DeviceSize offset=0, vk::DeviceSize size=VK_WHOLE_SIZE)
void memory (Usage previous, Usage next)
void release (vk::Image image, const vk::ImageSubresourceRange &range, Usage previous, Usage next, const QueueHandoff &handoff)
void acquire (vk::Image image, const vk::ImageSubresourceRange &range, Usage previous, Usage next, const QueueHandoff &handoff)
void release (vk::Buffer buffer, Usage previous, Usage next, const QueueHandoff &handoff, vk::DeviceSize offset=0, vk::DeviceSize size=VK_WHOLE_SIZE)
void acquire (vk::Buffer buffer, Usage next, const QueueHandoff &handoff, vk::DeviceSize offset=0, vk::DeviceSize size=VK_WHOLE_SIZE)
void flush (vk::CommandBuffer cmd)
auto empty () const -> bool
auto pendingImages () const -> std::span< const vk::ImageMemoryBarrier2 >
auto pendingBuffers () const -> std::span< const vk::BufferMemoryBarrier2 >
auto pendingMemory () const -> std::span< const vk::MemoryBarrier2 >

Detailed Description

Skips a barrier only when neither side writes and the layout and next read stages are already covered.

Member Function Documentation

◆ acquire()

void renderer::sync::BarrierBatch::acquire ( vk::Image image,
const vk::ImageSubresourceRange & range,
Usage previous,
Usage next,
const QueueHandoff & handoff )

On the consuming queue after the release fence was waited on. previous and next must match the release exactly and nothing is recorded within one family

Here is the caller graph for this function:

◆ release()

void renderer::sync::BarrierBatch::release ( vk::Image image,
const vk::ImageSubresourceRange & range,
Usage previous,
Usage next,
const QueueHandoff & handoff )

On the writing queue. A plain transition within one family. Across families next may name stages this queue lacks since the acquire waits for them


The documentation for this class was generated from the following files: