struct
#include <VaultedVulkan/VV_Command.hpp>
CommandPool Command pools are opaque objects that command buffer memory is allocated from, and which allow the implementation to amortize the cost of resource creation across multiple command buffers.
Contents
Command pools are externally synchronized, meaning that a command pool must not be used concurrently in multiple threads. That includes use via recording commands on any command buffers allocated from the pool, as well as operations that allocate, free, and reset command buffers or the pool itself.
Base classes
- struct VV::V1::CommandPool
- Command pools are opaque objects that command buffer memory is allocated from, and which allow the implementation to amortize the cost of resource creation across multiple command buffers. Command pools are externally synchronized, meaning that a command pool must not be used concurrently in multiple threads. That includes use via recording commands on any command buffers allocated from the pool, as well as operations that allocate, free, and reset command buffers or the pool itself.
Derived classes
- class VV::V3::CommandPool
- Command pools are opaque objects that command buffer memory is allocated from, and which allow the implementation to amortize the cost of resource creation across multiple command buffers.
Public types
-
using Parent = V1::
CommandPool
Public static functions
-
static auto Create(LogicalDevice::
Handle _deviceHandle, const CreateInfo& _createInfo, Handle& _commandPool) -> EResult - Uses the VulkanAPI's default allocator.
-
static void Destroy(LogicalDevice::
Handle _deviceHandle, Handle _commandPool) - Uses the VulkanAPI's default allocator.
-
static void Free(LogicalDevice::
Handle _device, const AllocateInfo& _info, const V1:: CommandBuffer:: Handle* _commandBuffers) - Allows for the passing of the allocate info to specify the pool and buffer count alternatively.
-
static auto BeginSingleTimeCommands(LogicalDevice::
Handle _device, CommandPool:: Handle _commandPool) -> V1:: CommandBuffer:: Handle - Will auto-allocate a command buffer on the specified pool and begin recording commands on the buffer.
-
static void EndSingleTimeCommands(V1::
CommandBuffer ::Handle _commandBuffer, CommandPool ::Handle _commandPool, LogicalDevice ::Handle _device, LogicalDevice:: Queue:: Handle _queue) - Will end the recording and submit the command buffer created with the BeginSingleTimeCommands function.
-
static auto Create(LogicalDevice::
Handle _deviceHandle, const CreateInfo& _createInfo, const Memory:: AllocationCallbacks* _allocator, Handle& _commandPool) -> EResult - Create a command pool.
-
static void Destroy(LogicalDevice::
Handle _deviceHandle, Handle _commandPool, const Memory:: AllocationCallbacks* _allocator) - Specification
-
static void Free(LogicalDevice::
Handle _deviceHandle, Handle _commandPool, ui32 _bufferCount, const CommandBuffer:: Handle* _commandBuffers) - Specification
Function documentation
static V1:: CommandBuffer:: Handle VV:: V2:: CommandPool:: BeginSingleTimeCommands(LogicalDevice:: Handle _device,
CommandPool:: Handle _commandPool)
Will auto-allocate a command buffer on the specified pool and begin recording commands on the buffer.
The handle to the command buffer will be returned.
Expected to be used with the EndSingleTimeCommands function (defined below it).
static void VV:: V2:: CommandPool:: EndSingleTimeCommands(V1:: CommandBuffer ::Handle _commandBuffer,
CommandPool ::Handle _commandPool,
LogicalDevice ::Handle _device,
LogicalDevice:: Queue:: Handle _queue)
Will end the recording and submit the command buffer created with the BeginSingleTimeCommands function.
Will wait until the queue is idle that the commands were submitted to. Will also free the command buffer after completion.
Expected to be used with the BeginSingleTimeCommands function (defined above it).
static EResult VV:: V2:: CommandPool:: Create(LogicalDevice:: Handle _deviceHandle,
const CreateInfo& _createInfo,
const Memory:: AllocationCallbacks* _allocator,
Handle& _commandPool)
Create a command pool.
Parameters | |
---|---|
_deviceHandle | |
_createInfo | |
_allocator | |
_commandPool |
static void VV:: V2:: CommandPool:: Destroy(LogicalDevice:: Handle _deviceHandle,
Handle _commandPool,
const Memory:: AllocationCallbacks* _allocator)
Parameters | |
---|---|
_deviceHandle | |
_commandPool | |
_allocator |
static void VV:: V2:: CommandPool:: Free(LogicalDevice:: Handle _deviceHandle,
Handle _commandPool,
ui32 _bufferCount,
const CommandBuffer:: Handle* _commandBuffers)
Parameters | |
---|---|
_deviceHandle | |
_commandPool | |
_bufferCount | |
_commandBuffers |