-------------------------------------------------------------------------
| 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 | { |
no test coverage detected