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

Public Member Functions

 DescriptorManager (vk::Device device) noexcept
 
DescriptorSetHandle createDescriptorSet (const std::vector< DescriptorBinding > &descriptorBindings)
 
void writeDescriptorSet (const DescriptorSetHandle &handle, const DescriptorWrites &writes, const ImageManager &imageManager, const BufferManager &bufferManager, const SamplerManager &samplerManager)
 
DescriptorSet getDescriptorSet (const DescriptorSetHandle handle) const
 

Private Member Functions

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

Static Private Member Functions

static vk::DescriptorType convertDescriptorTypeFlag (DescriptorType type)
 
static vk::ShaderStageFlagBits convertShaderStageFlag (ShaderStage stage)
 

Private Attributes

vk::Device m_Device
 
std::vector< vk::DescriptorPool > m_Pools
 
std::vector< vk::DescriptorPoolSize > m_PoolSizes
 
vk::DescriptorPoolCreateInfo m_PoolInfo
 
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

◆ convertDescriptorTypeFlag()

vk::DescriptorType vkcv::DescriptorManager::convertDescriptorTypeFlag ( DescriptorType  type)
staticprivate

Converts the flags of the descriptor types from VulkanCV (vkcv) to Vulkan (vk).

Parameters
[in]vkcvflag of the DescriptorType (see DescriptorConfig.hpp)
Returns
vk flag of the DescriptorType

◆ convertShaderStageFlag()

vk::ShaderStageFlagBits vkcv::DescriptorManager::convertShaderStageFlag ( ShaderStage  stage)
staticprivate

Converts the flags of the shader stages from VulkanCV (vkcv) to Vulkan (vk).

Parameters
[in]vkcvflag of the ShaderStage (see ShaderProgram.hpp)
Returns
vk flag of the ShaderStage

◆ destroyDescriptorSetById()

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

Destroys a specific resource description

Parameters
[in]thehandle id of the respective resource description

References m_DescriptorSets.

Member Data Documentation

◆ m_DescriptorSets

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

Contains all the resource descriptions that were requested by the user in calls of createResourceDescription.

Referenced by destroyDescriptorSetById().


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