344{
346
348 co_return;
349 }
350
352 uint32_t cycles_executed = 0;
353
354 while ((max_cycles == 0 || cycles_executed < max_cycles) && (
m_continuous_execution || cycles_executed < max_cycles)) {
355
356 if (promise.should_terminate) {
357 break;
358 }
359
360 bool waited = false;
361
363
366
368 continue;
369 }
370
372 continue;
373 }
374
377
378 for (uint32_t iter = 0; iter < op_iterations; ++iter) {
379
382
384
385 if (is_capture) {
386 waited = true;
387 co_await FrameDelay { .frames_to_wait = 1 };
388 } else if (frames_per_operation > 0) {
389 waited = true;
390 co_await FrameDelay { .frames_to_wait = frames_per_operation };
391 }
392 }
393 }
394
396
398
400 cycles_executed++;
401
402 if (!waited) {
403 co_await FrameDelay { .frames_to_wait = 1 };
404 }
405 }
406
409}
@ CAPTURE
Capture data from source buffer using BufferCapture strategy.
@ READY
Data ready for processing.
@ CONSUMED
Data has been processed.
@ EMPTY
No data available.
uint32_t operation_iterations(const BufferOperation &op) const
void process_operation(BufferOperation &op, uint64_t cycle)
void flow_through(size_t index, uint64_t cycle)
std::vector< BufferOperation > m_operations
std::vector< DataState > m_data_states
bool m_continuous_execution
std::function< void()> m_on_complete
bool operation_due(const BufferOperation &op) const
std::vector< std::shared_ptr< Vruta::Routine > > dispatch_cycle_branches(bool frame_rate)
GetPromiseBase< Vruta::graphics_promise > GetGraphicsPromise
Graphics domain promise accessor.