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

Method createCommandPool

code/29_mipmapping.cpp:765–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected