aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs b/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
index 155cba0f..051838f1 100644
--- a/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
@@ -242,6 +242,19 @@ namespace Ryujinx.Graphics.Gpu.Memory
WriteImpl(range, data, _cpuMemory.WriteUntracked);
}
+ /// <summary>
+ /// Writes data to the application process, returning false if the data was not changed.
+ /// This triggers read memory tracking, as a redundancy check would be useless if the data is not up to date.
+ /// </summary>
+ /// <remarks>The memory manager can return that memory has changed when it hasn't to avoid expensive data copies.</remarks>
+ /// <param name="address">Address to write into</param>
+ /// <param name="data">Data to be written</param>
+ /// <returns>True if the data was changed, false otherwise</returns>
+ public bool WriteWithRedundancyCheck(ulong address, ReadOnlySpan<byte> data)
+ {
+ return _cpuMemory.WriteWithRedundancyCheck(address, data);
+ }
+
private delegate void WriteCallback(ulong address, ReadOnlySpan<byte> data);
/// <summary>