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

Method createCommandPool

code/18_vertex_input.cpp:632–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected