From c9c65af59edea05e7206a076cb818128c004384e Mon Sep 17 00:00:00 2001 From: riperiperi Date: Tue, 22 Feb 2022 14:21:29 +0000 Subject: Perform unscaled 2d engine copy on CPU if source texture isn't in cache. (#3112) * 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 Co-authored-by: gdkchan --- Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs') 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 /// /// Gets a writable region from GPU mapped memory. /// - /// Start address of the range + /// Start address of the range /// Size in bytes to be range + /// True if write tracking is triggered on the span /// A writable region with the data at the specified memory location - 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); } } -- cgit v1.2.3