MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / getCachedSet

Method getCachedSet

RenderSystems/Vulkan/src/OgreVulkanGpuProgramManager.cpp:136–160  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

134 }
135 //-------------------------------------------------------------------------
136 VkDescriptorSetLayout VulkanGpuProgramManager::getCachedSet( const VulkanSingleSetLayoutDesc &set )
137 {
138 VkDescriptorSetLayout retVal = 0;
139
140 DescriptorSetMap::const_iterator itor = mDescriptorSetMap.find( set );
141
142 if( itor == mDescriptorSetMap.end() )
143 {
144 VkDescriptorSetLayoutCreateInfo descSetLayoutCi;
145 makeVkStruct( descSetLayoutCi, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO );
146 descSetLayoutCi.bindingCount = static_cast<uint32>( set.size() );
147 descSetLayoutCi.pBindings = set.begin();
148
149 VkResult result =
150 vkCreateDescriptorSetLayout( mDevice->mDevice, &descSetLayoutCi, 0, &retVal );
151 checkVkResult( result, "vkCreateDescriptorSetLayout" );
152 mDescriptorSetMap[set] = retVal;
153 }
154 else
155 {
156 retVal = itor->second;
157 }
158
159 return retVal;
160 }
161 //-------------------------------------------------------------------------
162 VulkanRootLayout *VulkanGpuProgramManager::getRootLayout( const RootLayout &rootLayout )
163 {

Callers 1

createVulkanHandlesMethod · 0.80

Calls 5

makeVkStructFunction · 0.85
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected