aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Memory
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory')
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/Buffer.cs2
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs5
2 files changed, 4 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/Buffer.cs b/Ryujinx.Graphics.Gpu/Memory/Buffer.cs
index 96e10e77..3f869a50 100644
--- a/Ryujinx.Graphics.Gpu/Memory/Buffer.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/Buffer.cs
@@ -412,7 +412,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
int offset = (int)(address - Address);
- byte[] data = _context.Renderer.GetBufferData(Handle, offset, (int)size);
+ ReadOnlySpan<byte> data = _context.Renderer.GetBufferData(Handle, offset, (int)size);
// TODO: When write tracking shaders, they will need to be aware of changes in overlapping buffers.
_physicalMemory.WriteUntracked(address, data);
diff --git a/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs b/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
index 289e7c1b..8df3c8fb 100644
--- a/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs
@@ -128,10 +128,11 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// </summary>
/// <param name="address">Start address of the range</param>
/// <param name="size">Size in bytes to be range</param>
+ /// <param name="tracked">True if write tracking is triggered on the span</param>
/// <returns>A writable region with the data at the specified memory location</returns>
- public WritableRegion GetWritableRegion(ulong address, int size)
+ public WritableRegion GetWritableRegion(ulong address, int size, bool tracked = false)
{
- return _cpuMemory.GetWritableRegion(address, size);
+ return _cpuMemory.GetWritableRegion(address, size, tracked);
}
/// <summary>