SpiecsEngine
 
Loading...
Searching...
No Matches

◆ UnLoad() [2/2]

void Spices::DescriptorSetManager::UnLoad ( const String2 & name)
static

UnLoad a VulkanDescriptorSet.

Parameters
nameThe owner's name of the descriptor set.

Definition at line 43 of file DescriptorSetManager.cpp.

44 {
46
47 std::unique_lock<std::mutex> lock(m_Mutex);
48
49 if (m_DescriptorSets.find(name) != m_DescriptorSets.end())
50 {
51 if (m_DescriptorSets[name].find(SpicesShader::BINDLESS_TEXTURE_SET) == m_DescriptorSets[name].end())
52 {
53 m_DescriptorSets.erase(name);
54 }
55 else
56 {
57 const auto descriptorSet = m_DescriptorSets[name][SpicesShader::BINDLESS_TEXTURE_SET];
58 m_DescriptorSets.erase(name);
59 m_DescriptorSets[name][SpicesShader::BINDLESS_TEXTURE_SET] = descriptorSet;
60 }
61 }
62 }
#define SPICES_PROFILE_ZONE
static std::mutex m_Mutex
Mutex of this DescriptorSetManager.
static DescriptorManagerContainer m_DescriptorSets
The container of all descriptor sets, identified with owner's name and set number.

Referenced by UnLoad().