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.

Reexports

pub use self::submit::CommandBuffer;
pub use self::submit::Submit;

Modules

pool

In the Vulkan API, command buffers must be allocated from command pools.

std
submit
sys

Lowest-level interface for command buffers creation.

Structs

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 draw_inline or next_subpass_inline.

PrimaryCommandBufferBuilderSecondaryDraw

Object that you obtain when calling draw_secondary or next_subpass_secondary.

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.