Exemplo n.º 1
0
 /// <summary>
 /// Queue a task to flush temporary files to the archive on the worker.
 /// </summary>
 public void FlushToArchiveAsync()
 {
     _fileWriterWorkerQueue.Add(new CacheFileOperationTask
     {
         Type = CacheFileOperation.FlushToArchive
     });
 }
Exemplo n.º 2
0
        private void IncrSyncpt(int data)
        {
            uint syncpointId = (uint)(data & 0xFF);
            uint cond        = (uint)((data >> 8) & 0xFF); // 0 = Immediate, 1 = Done

            if (cond == 0)
            {
                _syncptIncrMgr.Increment(syncpointId);
            }
            else
            {
                _commandQueue.Add(new SyncptIncrAction(_currentContextId, _syncptIncrMgr.IncrementWhenDone(_classId, syncpointId)));
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Queue a task to remove entries from the hash manifest.
 /// </summary>
 /// <param name="entries">Entries to remove from the manifest</param>
 public void RemoveManifestEntriesAsync(HashSet <Hash128> entries)
 {
     _fileWriterWorkerQueue.Add(new CacheFileOperationTask
     {
         Type = CacheFileOperation.RemoveManifestEntries,
         Data = entries
     });
 }
Exemplo n.º 4
0
        /// <summary>
        /// Queue a task to remove entries from the hash manifest.
        /// </summary>
        /// <param name="entries">Entries to remove from the manifest</param>
        public void RemoveManifestEntriesAsync(HashSet <Hash128> entries)
        {
            if (IsReadOnly)
            {
                Logger.Warning?.Print(LogClass.Gpu, "Trying to remove manifest entries on a read-only cache, ignoring.");

                return;
            }

            _fileWriterWorkerQueue.Add(new CacheFileOperationTask
            {
                Type = CacheFileOperation.RemoveManifestEntries,
                Data = entries
            });
        }
Exemplo n.º 5
0
 /// <summary>
 /// Adds a shader program to be cached in the background.
 /// </summary>
 /// <param name="program">Shader program to cache</param>
 /// <param name="hostCode">Host binary code of the program</param>
 public void AddShader(CachedShaderProgram program, byte[] hostCode)
 {
     _fileWriterWorkerQueue.Add(new CacheFileOperationTask(CacheFileOperation.AddShader, new AddShaderData(program, hostCode)));
 }
Exemplo n.º 6
0
 public void Submit(ReadOnlySpan <int> commandBuffer, long contextId)
 {
     _commandQueue.Add(new Command(commandBuffer.ToArray(), contextId));
 }
Exemplo n.º 7
0
 public void Submit(ReadOnlySpan <int> commandBuffer)
 {
     _commandQueue.Add(commandBuffer.ToArray());
 }
Exemplo n.º 8
0
 public void PushMessage(Switch device, KThread thread, KClientSession session, ulong messagePtr, ulong messageSize)
 {
     _ipcProcessor.Add(new IpcRequest(device, thread, session, messagePtr, messageSize));
 }