Class CommandPool

Class Documentation

class CommandPool

RAII wrapper class for VkCommandPool.

Public Functions

CommandPool(const Device &device, std::uint32_t queue_family_index, std::string name)

Default constructor

Parameters:
  • device – The device wrapper instance.

  • queue_family_index – The queue family index to use.

  • name – The internal debug marker name which will be assigned to this command pool.

CommandPool(const CommandPool&) = delete
CommandPool(CommandPool&&) noexcept
~CommandPool()
CommandPool &operator=(const CommandPool&) = delete
CommandPool &operator=(CommandPool&&) = delete
inline auto cmd_pool() const
const CommandBuffer &request_command_buffer(const std::string &name)

Request a command buffer

Parameters:

name – The internal debug name which will be assigned to this command buffer (must not be empty)

Returns:

A command buffer handle instance which allows access to the requested command buffer

Private Members

std::string m_name
const Device &m_device
VkCommandPool m_cmd_pool = {VK_NULL_HANDLE}
std::vector<std::unique_ptr<CommandBuffer>> m_cmd_bufs

The command buffers which can be requested by the current thread.