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

Method createCommandPool

code/30_multisampling.cpp:793–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791 }
792
793 void createCommandPool() {
794 QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);
795
796 VkCommandPoolCreateInfo poolInfo{};
797 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
798 poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
799 poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value();
800
801 if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
802 throw std::runtime_error("failed to create graphics command pool!");
803 }
804 }
805
806 void createColorResources() {
807 VkFormat colorFormat = swapChainImageFormat;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected