| 317 | } |
| 318 | |
| 319 | void |
| 320 | Sequence::createCommandBuffer() |
| 321 | { |
| 322 | KP_LOG_DEBUG("Kompute Sequence creating command buffer"); |
| 323 | if (!this->mDevice) { |
| 324 | throw std::runtime_error("Kompute Sequence device is null"); |
| 325 | } |
| 326 | if (!this->mCommandPool) { |
| 327 | throw std::runtime_error("Kompute Sequence command pool is null"); |
| 328 | } |
| 329 | |
| 330 | this->mFreeCommandBuffer = true; |
| 331 | |
| 332 | vk::CommandBufferAllocateInfo commandBufferAllocateInfo( |
| 333 | *this->mCommandPool, vk::CommandBufferLevel::ePrimary, 1); |
| 334 | |
| 335 | this->mCommandBuffer = std::make_shared<vk::CommandBuffer>(); |
| 336 | this->mDevice->allocateCommandBuffers(&commandBufferAllocateInfo, |
| 337 | this->mCommandBuffer.get()); |
| 338 | KP_LOG_DEBUG("Kompute Sequence Command Buffer Created"); |
| 339 | } |
| 340 | |
| 341 | void |
| 342 | Sequence::createTimestampQueryPool(uint32_t totalTimestamps) |