Module vulkano::command_buffer
[−]
[src]
Commands that the GPU will execute (includes draw commands).
With Vulkan, before the GPU can do anything you must create a CommandBuffer
. A command buffer
is a list of commands that will executed by the GPU. Once a command buffer is created, you can
execute it. A command buffer must be created even for the most simple tasks.
Pools
Command buffers are allocated from pools. You must first create a command buffer pool which you will create command buffers from.
A pool is linked to a queue family. Command buffers that are created from a certain pool can only be submitted to queues that belong to that specific family.
Primary and secondary command buffers.
There are three types of command buffers:
- Primary command buffers. They can contain any command. They are the only type of command buffer that can be submitted to a queue.
- Secondary "graphics" command buffers. They contain draw and clear commands. They can be called from a primary command buffer once a framebuffer has been selected.
- Secondary "compute" command buffers. They can contain non-draw and non-clear commands (eg. copying between buffers) and can be called from a primary command buffer outside of a render pass.
Note that secondary command buffers cannot call other command buffers.
Structs
CommandBufferPool |
A pool from which command buffers are created from. |
DrawIndexedIndirectCommand | |
DrawIndirectCommand | |
DynamicState |
The dynamic state to use for a draw command. |
PrimaryCommandBuffer |
Represents a collection of commands to be executed by the GPU. |
PrimaryCommandBufferBuilder |
A prototype of a primary command buffer. |
PrimaryCommandBufferBuilderInlineDraw |
Object that you obtain when calling |
PrimaryCommandBufferBuilderSecondaryDraw |
Object that you obtain when calling |
SecondaryComputeCommandBuffer |
Represents a collection of commands to be executed by the GPU. |
SecondaryComputeCommandBufferBuilder |
A prototype of a secondary compute command buffer. |
SecondaryGraphicsCommandBuffer |
Represents a collection of commands to be executed by the GPU. |
SecondaryGraphicsCommandBufferBuilder |
A prototype of a secondary compute command buffer. |
Submission |
Functions
submit |
Submits the command buffer to a queue so that it is executed. |