/// <summary> /// Processes commands pushed to the FIFO. /// </summary> public void DispatchCalls() { // Use this opportunity to also dispose any pending channels that were closed. _context.RunDeferredActions(); // Process command buffers. while (_ibEnable && !_interrupt && _commandBufferQueue.TryDequeue(out CommandBuffer entry)) { bool flushCommandBuffer = true; if (_flushSkips != 0) { _flushSkips--; flushCommandBuffer = false; } _currentCommandBuffer = entry; _currentCommandBuffer.Fetch(entry.Processor.MemoryManager, flushCommandBuffer); // If we are changing the current channel, // we need to force all the host state to be updated. if (_prevChannelProcessor != entry.Processor) { _prevChannelProcessor = entry.Processor; entry.Processor.ForceAllDirty(); } entry.Processor.Process(entry.EntryAddress, _currentCommandBuffer.Words); } _interrupt = false; }