Expand description

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 shorter list of 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

Structs

Buffer barriers should only be used when a queue family ownership transfer is required - prefer global barriers at all other times.

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 ImageLayout::General* layouts) then a global barrier should be preferred.

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

Defines all potential resource usages

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. Optimal is usually preferred.

Functions

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.

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.

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.