1#ifndef NNGN_GRAPHICS_VULKAN_CMD_POOL_H
2#define NNGN_GRAPHICS_VULKAN_CMD_POOL_H
25 VkDevice
dev, std::uint32_t queue_family,
26 VkCommandPoolCreateFlagBits flags = {});
28 bool alloc(std::size_t n);
43 this->dev = std::exchange(rhs.dev, {});
44 this->h = std::exchange(rhs.h, {});
45 this->m_buffers = std::exchange(rhs.m_buffers, {});
Definition: cmd_pool.h:14
bool alloc(std::size_t n)
Allocates n command buffers, which are appended to buffers.
Definition: cmd_pool.cpp:35
VkCommandPool h
Definition: cmd_pool.h:38
std::span< const VkCommandBuffer > buffers() const
Definition: cmd_pool.h:23
std::vector< VkCommandBuffer > m_buffers
Definition: cmd_pool.h:39
~CommandPool()
Definition: cmd_pool.cpp:12
VkDevice dev
Definition: cmd_pool.h:37
VkCommandPool id() const
Definition: cmd_pool.h:22
CommandPool(CommandPool &&rhs) noexcept
Definition: cmd_pool.h:20
CommandPool(const CommandPool &rhs)=delete
void reset()
Definition: cmd_pool.cpp:69
CommandPool & operator=(const CommandPool &rhs)=delete
bool realloc(std::size_t n)
Resets the pool and allocates n command buffers.
Definition: cmd_pool.cpp:59
void free()
Deallocates and frees all commands allocated from the pool.
Definition: cmd_pool.cpp:71
bool init(VkDevice dev, std::uint32_t queue_family, VkCommandPoolCreateFlagBits flags={})
Definition: cmd_pool.cpp:19
COMMAND_BUFFER DESCRIPTOR_POOL DESCRIPTOR_SET_LAYOUT FENCE IMAGE PIPELINE PIPELINE_CACHE RENDER_PASS SEMAPHORE BUFFER VkCommandPool
Definition: types.h:77
VkCommandBuffer
Definition: types.h:71