[−][src]Crate vk_sync
In an effort to make Vulkan synchronization more accessible, this library provides a simplification of core synchronization mechanisms such as pipeline barriers and events.
Rather than the complex maze of enums and bit flags in Vulkan - many combinations of which are invalid or nonsensical - this library collapses this to a much shorter list of ~40 distinct usage types, and a couple of options for handling image layouts.
Additionally, these usage types provide an easier mapping to other graphics APIs like DirectX 12.
Use of other synchronization mechanisms such as semaphores, fences and render passes are not addressed in this library at present.
Modules
cmd |
Structs
BufferBarrier | Buffer barriers should only be used when a queue family ownership transfer is required - prefer global barriers at all other times. |
GlobalBarrier | Global barriers define a set of accesses on multiple resources at once.
If a buffer or image doesn't require a queue ownership transfer, or an image
doesn't require a layout transition (e.g. you're using one of the
|
ImageBarrier | Image barriers should only be used when a queue family ownership transfer or an image layout transition is required - prefer global barriers at all other times. |
Enums
AccessType | Defines all potential resource usages |
ImageLayout | Defines a handful of layout options for images.
Rather than a list of all possible image layouts, this reduced list is
correlated with the access types to map to the correct Vulkan layouts.
|
Functions
get_buffer_memory_barrier | Mapping function that translates a buffer barrier into a set of source and destination pipeline stages, and a buffer memory barrier, that can be used with Vulkan synchronization methods. |
get_image_memory_barrier | Mapping function that translates an image barrier into a set of source and destination pipeline stages, and an image memory barrier, that can be used with Vulkan synchronization methods. |
get_memory_barrier | Mapping function that translates a global barrier into a set of source and destination pipeline stages, and a memory barrier, that can be used with Vulkan synchronization methods. |
Type Definitions
BufferType | |
ImageSubresourceRangeType | |
ImageType |