How it works...

In Vulkan, operations are processed in a pipeline. Even though the processing of operations needs to be started in the order in which they were submitted, parts of the pipeline may still be executed concurrently. But sometimes, we may need to synchronize these operations and tell the driver that we want some of them to wait for results of other operations.

Memory barriers are used to define moments in command buffers' execution, in which later commands should wait for the earlier commands to finish their job. They also cause the results of these operations to become visible for other operations.

Barriers are needed for memory operations to become visible for later commands. In cases where the operations write data to images ...

Get Vulkan Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.