MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / createCommandPool

Method createCommandPool

cpp/5_Domain_Specific/simpleVulkan/VulkanBaseApp.cpp:1100–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098}
1099
1100void VulkanBaseApp::createCommandPool()
1101{
1102 VkCommandPoolCreateInfo poolInfo = {};
1103 uint32_t graphicsIndex, presentIndex;
1104
1105 findGraphicsQueueIndicies(m_physicalDevice, m_surface, graphicsIndex, presentIndex);
1106
1107 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
1108 poolInfo.queueFamilyIndex = graphicsIndex;
1109 poolInfo.flags = 0; // Optional
1110
1111 if (vkCreateCommandPool(m_device, &poolInfo, nullptr, &m_commandPool) != VK_SUCCESS) {
1112 throw std::runtime_error("Failed to create command pool!");
1113 }
1114}
1115
1116static void transitionImageLayout(VulkanBaseApp *app,
1117 VkImage image,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected