/// <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 }); }
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))); } }
/// <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 }); }
/// <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 }); }
/// <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))); }
public void Submit(ReadOnlySpan <int> commandBuffer, long contextId) { _commandQueue.Add(new Command(commandBuffer.ToArray(), contextId)); }
public void Submit(ReadOnlySpan <int> commandBuffer) { _commandQueue.Add(commandBuffer.ToArray()); }
public void PushMessage(Switch device, KThread thread, KClientSession session, ulong messagePtr, ulong messageSize) { _ipcProcessor.Add(new IpcRequest(device, thread, session, messagePtr, messageSize)); }