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

Method createCommandPool

code/28_model_loading.cpp:764–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762 }
763
764 void createCommandPool() {
765 QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);
766
767 VkCommandPoolCreateInfo poolInfo{};
768 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
769 poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
770 poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value();
771
772 if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
773 throw std::runtime_error("failed to create graphics command pool!");
774 }
775 }
776
777 void createDepthResources() {
778 VkFormat depthFormat = findDepthFormat();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected