| 1325 | } |
| 1326 | |
| 1327 | void createCommandBuffers() { |
| 1328 | commandBuffers.resize(MAX_FRAMES_IN_FLIGHT); |
| 1329 | |
| 1330 | VkCommandBufferAllocateInfo allocInfo{}; |
| 1331 | allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; |
| 1332 | allocInfo.commandPool = commandPool; |
| 1333 | allocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; |
| 1334 | allocInfo.commandBufferCount = (uint32_t) commandBuffers.size(); |
| 1335 | |
| 1336 | if (vkAllocateCommandBuffers(device, &allocInfo, commandBuffers.data()) != VK_SUCCESS) { |
| 1337 | throw std::runtime_error("failed to allocate command buffers!"); |
| 1338 | } |
| 1339 | } |
| 1340 | |
| 1341 | void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { |
| 1342 | VkCommandBufferBeginInfo beginInfo{}; |
nothing calls this directly
no outgoing calls
no test coverage detected