MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / createDescriptorPool

Method createDescriptorPool

code/25_sampler.cpp:950–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948 }
949
950 void createDescriptorPool() {
951 VkDescriptorPoolSize poolSize{};
952 poolSize.type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
953 poolSize.descriptorCount = static_cast<uint32_t>(MAX_FRAMES_IN_FLIGHT);
954
955 VkDescriptorPoolCreateInfo poolInfo{};
956 poolInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
957 poolInfo.poolSizeCount = 1;
958 poolInfo.pPoolSizes = &poolSize;
959 poolInfo.maxSets = static_cast<uint32_t>(MAX_FRAMES_IN_FLIGHT);
960
961 if (vkCreateDescriptorPool(device, &poolInfo, nullptr, &descriptorPool) != VK_SUCCESS) {
962 throw std::runtime_error("failed to create descriptor pool!");
963 }
964 }
965
966 void createDescriptorSets() {
967 std::vector<VkDescriptorSetLayout> layouts(MAX_FRAMES_IN_FLIGHT, descriptorSetLayout);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected