VkCV Framework  0.0.1
CV Vulkan framework
vkcv::DescriptorManager Class Reference

Public Member Functions

 DescriptorManager (vk::Device device) noexcept
 
DescriptorSetLayoutHandle createDescriptorSetLayout (const std::unordered_map< uint32_t, DescriptorBinding > &setBindingsMap)
 
DescriptorSetHandle createDescriptorSet (const DescriptorSetLayoutHandle &setLayoutHandle)
 
void writeDescriptorSet (const DescriptorSetHandle &handle, const DescriptorWrites &writes, const ImageManager &imageManager, const BufferManager &bufferManager, const SamplerManager &samplerManager)
 
DescriptorSetLayout getDescriptorSetLayout (const DescriptorSetLayoutHandle handle) const
 
DescriptorSet getDescriptorSet (const DescriptorSetHandle handle) const
 

Private Member Functions

void destroyDescriptorSetById (uint64_t id)
 
void destroyDescriptorSetLayoutById (uint64_t id)
 
vk::DescriptorPool allocateDescriptorPool ()
 

Private Attributes

vk::Device m_Device
 
std::vector< vk::DescriptorPool > m_Pools
 
std::vector< vk::DescriptorPoolSize > m_PoolSizes
 
vk::DescriptorPoolCreateInfo m_PoolInfo
 
std::vector< DescriptorSetLayoutm_DescriptorSetLayouts
 
std::vector< DescriptorSetm_DescriptorSets
 

Detailed Description

Constructor & Destructor Documentation

◆ DescriptorManager()

vkcv::DescriptorManager::DescriptorManager ( vk::Device  device)
explicitnoexcept

Allocate the set size for the descriptor pools, namely 1000 units of each descriptor type below. Finally, create an initial pool.

Member Function Documentation

◆ allocateDescriptorPool()

vk::DescriptorPool vkcv::DescriptorManager::allocateDescriptorPool ( )
private

creates a descriptor pool based on the poolSizes and poolInfo defined in the constructor is called initially in the constructor and then every time the pool runs out memory

Returns
a DescriptorPool object

◆ destroyDescriptorSetById()

void vkcv::DescriptorManager::destroyDescriptorSetById ( uint64_t  id)
private

Destroys a specific descriptor set

Parameters
[in]theDescriptorSetHandle

References m_DescriptorSets.

◆ destroyDescriptorSetLayoutById()

void vkcv::DescriptorManager::destroyDescriptorSetLayoutById ( uint64_t  id)
private

Destroys a specific descriptor set LAYOUT (not the set)

Parameters
[in]theDescriptorSetLayoutHandle

References m_DescriptorSetLayouts.

Member Data Documentation

◆ m_DescriptorSetLayouts

std::vector<DescriptorSetLayout> vkcv::DescriptorManager::m_DescriptorSetLayouts
private

Contains all the descriptor set layout descriptions that were requested by the user in calls of createDescriptorSetLayout.

Referenced by destroyDescriptorSetLayoutById().

◆ m_DescriptorSets

std::vector<DescriptorSet> vkcv::DescriptorManager::m_DescriptorSets
private

Contains all the descriptor sets that were created by the user in calls of createDescriptorSet.

Referenced by destroyDescriptorSetById().


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