Command Buffers in Vulkan

Command buffers are used to store commands which will be executed by the GPU

Command buffers in Vulkan are similar to listing drawing commands in OpenGL ES. The major difference is that command buffers are much more flexible.

In simple terms, command buffers are sections of memory which store GPU commands, such as draw calls and memory transfer operations. Commands are recorded into command buffers in advance. When the application is ready for these commands to be executed, it can submit the command buffer to a queue. The GPU actually executes these commands asynchronously at some point after submission. Vulkan makes very few guarantees about execution order to give the GPU the freedom to decide the optimal way to order its processing. This means explicit synchronisation, through use of semaphores, fences, and events, is required.

Splitting recording and submission of commands is intended to improve performance, as the driver can determine, in advance, the most efficient way to divide the work between multiple threads.