aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2022-02-22 14:21:29 +0000
committerGitHub <noreply@github.com>2022-02-22 11:21:29 -0300
commitc9c65af59edea05e7206a076cb818128c004384e (patch)
tree11441b1b91be53ecc6e5d642123a3111c05ec282 /Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs
parentdc063eac8330da0b18f0f76c7c9c0e484fa10c56 (diff)
Perform unscaled 2d engine copy on CPU if source texture isn't in cache. (#3112)1.1.51
* Initial implementation of fast 2d copy TODO: Partial copy for mismatching region/size. * WIP * Cleanup * Update Ryujinx.Graphics.Gpu/Engine/Twod/TwodClass.cs Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs
index 3968cb96..b6395e73 100644
--- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs
@@ -154,14 +154,15 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <summary>
/// Gets a writable region from GPU mapped memory.
/// </summary>
- /// <param name="address">Start address of the range</param>
+ /// <param name="va">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 va, int size)
+ public WritableRegion GetWritableRegion(ulong va, int size, bool tracked = false)
{
if (IsContiguous(va, size))
{
- return Physical.GetWritableRegion(Translate(va), size);
+ return Physical.GetWritableRegion(Translate(va), size, tracked);
}
else
{
@@ -169,7 +170,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
GetSpan(va, size).CopyTo(memory.Span);
- return new WritableRegion(this, va, memory);
+ return new WritableRegion(this, va, memory, tracked);
}
}