| 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); |
nothing calls this directly
no outgoing calls
no test coverage detected