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

Method createCommandPool

code/15_hello_triangle.cpp:556–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554 }
555
556 void createCommandPool() {
557 QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);
558
559 VkCommandPoolCreateInfo poolInfo{};
560 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
561 poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
562 poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value();
563
564 if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
565 throw std::runtime_error("failed to create command pool!");
566 }
567 }
568
569 void createCommandBuffer() {
570 VkCommandBufferAllocateInfo allocInfo{};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected