示例#1
0
 /// <summary>
 /// Create any syncs from WaitForIdle command that are currently pending.
 /// </summary>
 public void CreatePendingSyncs()
 {
     if (_createSyncPending)
     {
         _createSyncPending = false;
         _context.CreateHostSyncIfNeeded(false);
     }
 }
示例#2
0
        /// <summary>
        /// Performs an incrementation on a syncpoint.
        /// </summary>
        /// <param name="argument">Method call argument</param>
        public void IncrementSyncpoint(int argument)
        {
            uint syncpointId = (uint)argument & 0xFFFF;

            _context.CreateHostSyncIfNeeded();
            _context.Renderer.UpdateCounters(); // Poll the query counters, the game may want an updated result.
            _context.Synchronization.IncrementSyncpoint(syncpointId);
        }
示例#3
0
        /// <summary>
        /// Apply a fence operation on a syncpoint.
        /// </summary>
        /// <param name="argument">Method call argument</param>
        public void Syncpointb(int argument)
        {
            SyncpointbOperation operation = _state.State.SyncpointbOperation;

            uint syncpointId = (uint)_state.State.SyncpointbSyncptIndex;

            if (operation == SyncpointbOperation.Wait)
            {
                uint threshold = (uint)_state.State.SyncpointaPayload;

                _context.Synchronization.WaitOnSyncpoint(syncpointId, threshold, Timeout.InfiniteTimeSpan);
            }
            else if (operation == SyncpointbOperation.Incr)
            {
                _context.CreateHostSyncIfNeeded();
                _context.Synchronization.IncrementSyncpoint(syncpointId);
            }

            _context.AdvanceSequence();
        }