| 630 | } |
| 631 | |
| 632 | void createCommandPool() { |
| 633 | QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice); |
| 634 | |
| 635 | VkCommandPoolCreateInfo poolInfo{}; |
| 636 | poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; |
| 637 | poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; |
| 638 | poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value(); |
| 639 | |
| 640 | if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) { |
| 641 | throw std::runtime_error("failed to create command pool!"); |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | void createCommandBuffers() { |
| 646 | commandBuffers.resize(MAX_FRAMES_IN_FLIGHT); |
nothing calls this directly
no outgoing calls
no test coverage detected