| 34 | } |
| 35 | |
| 36 | void |
| 37 | Sequence::begin() |
| 38 | { |
| 39 | KP_LOG_DEBUG("Kompute sequence called BEGIN"); |
| 40 | |
| 41 | if (this->isRecording()) { |
| 42 | KP_LOG_DEBUG("Kompute Sequence begin called when already recording"); |
| 43 | return; |
| 44 | } |
| 45 | |
| 46 | if (this->isRunning()) { |
| 47 | throw std::runtime_error( |
| 48 | "Kompute Sequence begin called when sequence still running"); |
| 49 | } |
| 50 | |
| 51 | KP_LOG_INFO("Kompute Sequence command now started recording"); |
| 52 | this->mCommandBuffer->begin(vk::CommandBufferBeginInfo()); |
| 53 | this->mRecording = true; |
| 54 | |
| 55 | // latch the first timestamp before any commands are submitted |
| 56 | if (this->timestampQueryPool) |
| 57 | this->mCommandBuffer->writeTimestamp( |
| 58 | vk::PipelineStageFlagBits::eAllCommands, |
| 59 | *this->timestampQueryPool, |
| 60 | 0); |
| 61 | } |
| 62 | |
| 63 | void |
| 64 | Sequence::end() |