259{
261
263 co_return;
264 }
265
267 uint32_t cycles_executed = 0;
268
269 while ((max_cycles == 0 || cycles_executed < max_cycles) && (
m_continuous_execution || cycles_executed < max_cycles)) {
270
271 if (promise.should_terminate) {
272 break;
273 }
274
275 bool waited = false;
276
279
282
284 continue;
285 }
286
288
289 for (uint32_t iter = 0; iter < op_iterations; ++iter) {
291 waited = true;
292 co_await FrameDelay { .frames_to_wait = 1 };
293 }
294
296 }
297
300
302 continue;
303 }
304
306 continue;
307 }
308
310 continue;
311 }
312
315
316 if (frames_per_operation > 0) {
317 waited = true;
318 co_await FrameDelay { .frames_to_wait = frames_per_operation };
319 }
320 }
321
323
325 waited = true;
326 co_await FrameDelay { .frames_to_wait = 1 };
327 }
328
330
332 cycles_executed++;
333
334 if (!waited) {
335 co_await FrameDelay { .frames_to_wait = 1 };
336 }
337 }
338
341}
static bool is_capture_phase_operation(const BufferOperation &op)
static bool is_process_phase_operation(const BufferOperation &op)
@ 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)
std::vector< BufferOperation > m_operations
std::vector< DataState > m_data_states
bool m_continuous_execution
static bool any_active(const std::vector< std::shared_ptr< Vruta::Routine > > &tasks)
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.