aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Synchronization/ISyncActionHandler.cs
blob: d470d2f07f8d373d187b3f22b2f9f285a4e8845e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace Ryujinx.Graphics.Gpu.Synchronization
{
    /// <summary>
    /// This interface indicates that a class can be registered for a sync action.
    /// </summary>
    interface ISyncActionHandler
    {
        /// <summary>
        /// Action to be performed when some synchronizing action is reached after modification.
        /// Generally used to register read/write tracking to flush resources from GPU when their memory is used.
        /// </summary>
        /// <param name="syncpoint">True if the action is a guest syncpoint</param>
        /// <returns>True if the action is to be removed, false otherwise</returns>
        bool SyncAction(bool syncpoint);

        /// <summary>
        /// Action to be performed immediately before sync is created.
        /// </summary>
        /// <param name="syncpoint">True if the action is a guest syncpoint</param>
        void SyncPreAction(bool syncpoint) { }
    }
}