Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
DescriptorSetLayoutCache Class Reference

The use of this class is to cache descriptor set layouts. More...

#include <DescriptorBuilder.hpp>

Collaboration diagram for DescriptorSetLayoutCache:
Collaboration graph

Classes

struct  DescriptorLayoutHasher
 
struct  DescriptorSetLayoutInfo
 

Public Member Functions

 DescriptorSetLayoutCache (VkDevice device)
 
 ~DescriptorSetLayoutCache ()
 
VkDescriptorSetLayout createDescriptorSetLayout (VkDescriptorSetLayoutCreateInfo &layoutInfo)
 Creates a descriptor set layout from the given info, or returns one from the cache if it already exists. More...
 
VkDescriptorSetLayout createDescriptorSetLayout (const VkDescriptorSetLayoutBinding *bindings, uint32_t bindingCount)
 Creates a descriptor set layout from the given bindings, or returns one from the cache if it already exists. More...
 

Private Attributes

VkDevice logDeviceM
 
std::unordered_map< DescriptorSetLayoutInfo, VkDescriptorSetLayout, DescriptorLayoutHasherlayoutCacheM
 

Detailed Description

The use of this class is to cache descriptor set layouts.

Constructor & Destructor Documentation

◆ DescriptorSetLayoutCache()

DescriptorSetLayoutCache::DescriptorSetLayoutCache ( VkDevice  device)

◆ ~DescriptorSetLayoutCache()

DescriptorSetLayoutCache::~DescriptorSetLayoutCache ( )

Member Function Documentation

◆ createDescriptorSetLayout() [1/2]

VkDescriptorSetLayout DescriptorSetLayoutCache::createDescriptorSetLayout ( const VkDescriptorSetLayoutBinding *  bindings,
uint32_t  bindingCount 
)

Creates a descriptor set layout from the given bindings, or returns one from the cache if it already exists.

Parameters
bindingsto create a layout of.
bindingCountof the bindings.
Returns
Created layout.
Here is the call graph for this function:

◆ createDescriptorSetLayout() [2/2]

VkDescriptorSetLayout DescriptorSetLayoutCache::createDescriptorSetLayout ( VkDescriptorSetLayoutCreateInfo &  layoutInfo)

Creates a descriptor set layout from the given info, or returns one from the cache if it already exists.

Parameters
layoutInfoLayout info
Returns
Allocated descriptor set layout
Here is the caller graph for this function:

Member Data Documentation

◆ layoutCacheM

std::unordered_map<DescriptorSetLayoutInfo, VkDescriptorSetLayout, DescriptorLayoutHasher> DescriptorSetLayoutCache::layoutCacheM
private

◆ logDeviceM

VkDevice DescriptorSetLayoutCache::logDeviceM
private

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