Manages the lifecycle of a single |vk::CommandPool|. More...
#include <command_pool_vk.h>
Public Member Functions | |
| ~CommandPoolVK () | |
| CommandPoolVK (vk::UniqueCommandPool pool, std::vector< vk::UniqueCommandBuffer > &&buffers, std::weak_ptr< ContextVK > &context) | |
| Creates a resource that manages the life of a command pool. More... | |
| vk::UniqueCommandBuffer | CreateCommandBuffer () |
| Creates and returns a new |vk::CommandBuffer|. More... | |
| void | CollectCommandBuffer (vk::UniqueCommandBuffer &&buffer) |
| Collects the given |vk::CommandBuffer| to be retained. More... | |
| void | Destroy () |
| Delete all Vulkan objects in this command pool. More... | |
Manages the lifecycle of a single |vk::CommandPool|.
A |vk::CommandPool| is expensive to create and reset. This class manages the lifecycle of a single |vk::CommandPool| by returning to the origin (|CommandPoolRecyclerVK|) when it is destroyed to be reused.
Definition at line 31 of file command_pool_vk.h.
| impeller::CommandPoolVK::~CommandPoolVK | ( | ) |
Definition at line 72 of file command_pool_vk.cc.
|
inline |
Creates a resource that manages the life of a command pool.
| [in] | pool | The command pool to manage. |
| [in] | buffers | Zero or more command buffers in an initial state. |
| [in] | recycler | The context that will be notified on destruction. |
Definition at line 40 of file command_pool_vk.h.
| void impeller::CommandPoolVK::CollectCommandBuffer | ( | vk::UniqueCommandBuffer && | buffer | ) |
Collects the given |vk::CommandBuffer| to be retained.
| [in] | buffer | The |vk::CommandBuffer| to collect. |
Definition at line 129 of file command_pool_vk.cc.
| vk::UniqueCommandBuffer impeller::CommandPoolVK::CreateCommandBuffer | ( | ) |
Creates and returns a new |vk::CommandBuffer|.
{} default instance (i.e. while being torn down). Definition at line 101 of file command_pool_vk.cc.
| void impeller::CommandPoolVK::Destroy | ( | ) |