Class VulkanCommandPool#

Inheritance Relationships#

Base Type#

Class Documentation#

class VulkanCommandPool : public TRAP::Graphics::CommandPool#

Public Functions

explicit VulkanCommandPool(const RendererAPI::CommandPoolDesc &desc)#

Constructor.

Parameters:

desc – Command pool description.

~VulkanCommandPool() override#

Destructor.

consteval VulkanCommandPool(const VulkanCommandPool&) noexcept = delete#

Copy constructor.

consteval VulkanCommandPool &operator=(const VulkanCommandPool&) noexcept = delete#

Copy assignment operator.

VulkanCommandPool(VulkanCommandPool&&) noexcept = default#

Move constructor.

VulkanCommandPool &operator=(VulkanCommandPool&&) noexcept = default#

Move assignment operator.

constexpr VkCommandPool GetVkCommandPool() const noexcept#

Retrieve the VkCommandPool handle.

Returns:

VkCommandPool handle.

virtual CommandBuffer &GetCommandBuffer(bool secondary, std::string_view name = "") override#

Retrieve a new command buffer.

Note

The lifetime of the command buffer ends when the command pool gets destroyed or when ReleaseCommandBuffer() gets called.

Parameters:
  • secondary – Should the command buffer be a secondary command buffer.

  • nameOptional: Name for the command buffer.

Returns:

Newly created command buffer.

virtual void ReleaseCommandBuffer(const CommandBuffer &cmdBuffer) override#

Release a command buffer.

Parameters:

cmdBuffer – Command buffer to release.

virtual void Reset() const override#

Reset the command pool. All allocated command buffers are reset to their initial state (i.e. valid non-recording).