LiteFX::Rendering::Backends::VulkanQueue::createCommandBuffer¶
Creates a command buffer that can be used to allocate commands on the queue.
Synopsis¶
Declared in <litefx/backends/vulkan.hpp>
[[dllimport, dllexport]] virtual SharedPtr<VulkanCommandBuffer> createCommandBuffer(
bool beginRecording = false,
bool secondary = false) const override;
Description¶
Specifying secondary allows to create secondary command buffers (aka. bundles). Those are intended to be used as efficient pre-recorded command buffers that are re-used multiple times. Using such a command buffer allows drivers to pre-apply optimizations, which causes a one-time cost during setup, but reduces cost when re- applying the command buffer multiple times. Ideally they are used as small chunks of re-occurring workloads.
A secondary command buffer must not be submitted to a queue, but rather to a primary command buffer by calling ICommandBuffer::execute.
Return Value¶
The instance of the command buffer.
Parameters¶
| Name | Description |
|---|---|
| beginRecording | If set to true, the command buffer will be initialized in recording state and can receive commands straight away. |
| secondary | If set to true, the method will create a secondary command buffer/bundle. |