nngn
Loading...
Searching...
No Matches
nngn::CommandPool Class Reference

#include <cmd_pool.h>

Public Member Functions

 CommandPool ()=default
 
 ~CommandPool ()
 
 CommandPool (const CommandPool &rhs)=delete
 
CommandPooloperator= (const CommandPool &rhs)=delete
 
 CommandPool (CommandPool &&rhs) noexcept
 
CommandPooloperator= (CommandPool &&rhs) noexcept
 
VkCommandPool id () const
 
std::span< const VkCommandBufferbuffers () const
 
bool init (VkDevice dev, std::uint32_t queue_family, VkCommandPoolCreateFlagBits flags={})
 
bool alloc (std::size_t n)
 Allocates n command buffers, which are appended to buffers.
 
bool realloc (std::size_t n)
 Resets the pool and allocates n command buffers.
 
void reset ()
 
void free ()
 Deallocates and frees all commands allocated from the pool.
 
 CommandPool ()=default
 
 ~CommandPool ()
 
 CommandPool (const CommandPool &rhs)=delete
 
CommandPooloperator= (const CommandPool &rhs)=delete
 
 CommandPool (CommandPool &&rhs) noexcept
 
CommandPooloperator= (CommandPool &&rhs) noexcept
 
VkCommandPool id () const
 
std::span< const VkCommandBufferbuffers () const
 
bool init (VkDevice dev, std::uint32_t queue_family, VkCommandPoolCreateFlagBits flags={})
 
bool alloc (std::size_t n)
 Allocates n command buffers, which are appended to buffers.
 
bool realloc (std::size_t n)
 Resets the pool and allocates n command buffers.
 
void reset ()
 
void free ()
 Deallocates and frees all commands allocated from the pool.
 

Private Member Functions

bool alloc (std::size_t n, VkCommandBuffer *p)
 
void free (std::size_t n, VkCommandBuffer *p)
 
bool alloc (std::size_t n, VkCommandBuffer *p)
 
void free (std::size_t n, VkCommandBuffer *p)
 

Private Attributes

VkDevice dev = {}
 
VkCommandPool h = {}
 
std::vector< VkCommandBufferm_buffers = {}
 

Constructor & Destructor Documentation

◆ CommandPool() [1/6]

nngn::CommandPool::CommandPool ( )
default

◆ ~CommandPool() [1/2]

nngn::CommandPool::~CommandPool ( )

◆ CommandPool() [2/6]

nngn::CommandPool::CommandPool ( const CommandPool rhs)
delete

◆ CommandPool() [3/6]

nngn::CommandPool::CommandPool ( CommandPool &&  rhs)
inlinenoexcept

◆ CommandPool() [4/6]

nngn::CommandPool::CommandPool ( )
default

◆ ~CommandPool() [2/2]

nngn::CommandPool::~CommandPool ( )

◆ CommandPool() [5/6]

nngn::CommandPool::CommandPool ( const CommandPool rhs)
delete

◆ CommandPool() [6/6]

nngn::CommandPool::CommandPool ( CommandPool &&  rhs)
inlinenoexcept

Member Function Documentation

◆ alloc() [1/4]

bool nngn::CommandPool::alloc ( std::size_t  n)

Allocates n command buffers, which are appended to buffers.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ alloc() [2/4]

bool nngn::CommandPool::alloc ( std::size_t  n)

Allocates n command buffers, which are appended to buffers.

◆ alloc() [3/4]

bool nngn::CommandPool::alloc ( std::size_t  n,
VkCommandBuffer p 
)
private
Here is the call graph for this function:

◆ alloc() [4/4]

bool nngn::CommandPool::alloc ( std::size_t  n,
VkCommandBuffer p 
)
private

◆ buffers() [1/2]

std::span< const VkCommandBuffer > nngn::CommandPool::buffers ( ) const
inline

◆ buffers() [2/2]

std::span< const VkCommandBuffer > nngn::CommandPool::buffers ( ) const
inline

◆ free() [1/4]

void nngn::CommandPool::free ( )

Deallocates and frees all commands allocated from the pool.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free() [2/4]

void nngn::CommandPool::free ( )

Deallocates and frees all commands allocated from the pool.

◆ free() [3/4]

void nngn::CommandPool::free ( std::size_t  n,
VkCommandBuffer p 
)
private

◆ free() [4/4]

void nngn::CommandPool::free ( std::size_t  n,
VkCommandBuffer p 
)
private

◆ id() [1/2]

VkCommandPool nngn::CommandPool::id ( ) const
inline

◆ id() [2/2]

VkCommandPool nngn::CommandPool::id ( ) const
inline

◆ init() [1/2]

bool nngn::CommandPool::init ( VkDevice  dev,
std::uint32_t  queue_family,
VkCommandPoolCreateFlagBits  flags = {} 
)
Here is the call graph for this function:

◆ init() [2/2]

bool nngn::CommandPool::init ( VkDevice  dev,
std::uint32_t  queue_family,
VkCommandPoolCreateFlagBits  flags = {} 
)

◆ operator=() [1/4]

CommandPool & nngn::CommandPool::operator= ( CommandPool &&  rhs)
inlinenoexcept

◆ operator=() [2/4]

CommandPool & nngn::CommandPool::operator= ( CommandPool &&  rhs)
noexcept

◆ operator=() [3/4]

CommandPool & nngn::CommandPool::operator= ( const CommandPool rhs)
delete

◆ operator=() [4/4]

CommandPool & nngn::CommandPool::operator= ( const CommandPool rhs)
delete

◆ realloc() [1/2]

bool nngn::CommandPool::realloc ( std::size_t  n)

Resets the pool and allocates n command buffers.

Here is the call graph for this function:

◆ realloc() [2/2]

bool nngn::CommandPool::realloc ( std::size_t  n)

Resets the pool and allocates n command buffers.

◆ reset() [1/2]

void nngn::CommandPool::reset ( )
Here is the caller graph for this function:

◆ reset() [2/2]

void nngn::CommandPool::reset ( )

Member Data Documentation

◆ dev

VkDevice nngn::CommandPool::dev = {}
private

◆ h

VkCommandPool nngn::CommandPool::h = {}
private

◆ m_buffers

std::vector< VkCommandBuffer > nngn::CommandPool::m_buffers = {}
private

The documentation for this class was generated from the following files: