MCPcopy Create free account
hub / github.com/KhronosGroup/glTF-IBL-Sampler / createDescriptorSet

Method createDescriptorSet

lib/source/vkHelper.cpp:680–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680VkResult IBLLib::vkHelper::createDescriptorSet(VkDescriptorSet& _outDescriptorSet, VkDescriptorSetLayout _layout) const
681{
682 if (m_logicalDevice == VK_NULL_HANDLE || m_descriptorPool == VK_NULL_HANDLE)
683 {
684 return VK_RESULT_MAX_ENUM;
685 }
686
687 VkResult res = VK_SUCCESS;
688
689 VkDescriptorSetAllocateInfo info{};
690 info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
691 info.pNext = nullptr;
692 info.pSetLayouts = &_layout;
693 info.descriptorSetCount = 1u;
694 info.descriptorPool = m_descriptorPool;
695
696 if ((res = vkAllocateDescriptorSets(m_logicalDevice, &info, &_outDescriptorSet)) != VK_SUCCESS)
697 {
698 printf("Failed to allocate descriptor set [%u]\n", res);
699 }
700
701 return res;
702}
703
704VkResult IBLLib::vkHelper::createDescriptorSets(std::vector<VkDescriptorSet>& _outDescriptorSets, const std::vector<VkDescriptorSetLayout>& _layouts) const
705{

Callers 1

createMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected