ISynchronizationManager.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Ryujinx.Common.Logging;
  2. using System;
  3. using System.Threading;
  4. namespace Ryujinx.Graphics.Device
  5. {
  6. /// <summary>
  7. /// Synchronization manager interface.
  8. /// </summary>
  9. public interface ISynchronizationManager
  10. {
  11. /// <summary>
  12. /// Increment the value of a syncpoint with a given id.
  13. /// </summary>
  14. /// <param name="id">The id of the syncpoint</param>
  15. /// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
  16. /// <returns>The incremented value of the syncpoint</returns>
  17. uint IncrementSyncpoint(uint id);
  18. /// <summary>
  19. /// Get the value of a syncpoint with a given id.
  20. /// </summary>
  21. /// <param name="id">The id of the syncpoint</param>
  22. /// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
  23. /// <returns>The value of the syncpoint</returns>
  24. uint GetSyncpointValue(uint id);
  25. /// <summary>
  26. /// Wait on a syncpoint with a given id at a target threshold.
  27. /// The callback will be called once the threshold is reached and will automatically be unregistered.
  28. /// </summary>
  29. /// <param name="id">The id of the syncpoint</param>
  30. /// <param name="threshold">The target threshold</param>
  31. /// <param name="timeout">The timeout</param>
  32. /// <exception cref="System.ArgumentOutOfRangeException">Thrown when id >= MaxHardwareSyncpoints</exception>
  33. /// <returns>True if timed out</returns>
  34. bool WaitOnSyncpoint(uint id, uint threshold, TimeSpan timeout);
  35. }
  36. }