| 1078 | } |
| 1079 | |
| 1080 | void createCommandBuffers() { |
| 1081 | commandBuffers.resize(MAX_FRAMES_IN_FLIGHT); |
| 1082 | |
| 1083 | VkCommandBufferAllocateInfo allocInfo{}; |
| 1084 | allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; |
| 1085 | allocInfo.commandPool = commandPool; |
| 1086 | allocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; |
| 1087 | allocInfo.commandBufferCount = (uint32_t) commandBuffers.size(); |
| 1088 | |
| 1089 | if (vkAllocateCommandBuffers(device, &allocInfo, commandBuffers.data()) != VK_SUCCESS) { |
| 1090 | throw std::runtime_error("failed to allocate command buffers!"); |
| 1091 | } |
| 1092 | } |
| 1093 | |
| 1094 | void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { |
| 1095 | VkCommandBufferBeginInfo beginInfo{}; |
nothing calls this directly
no outgoing calls
no test coverage detected