diff options
author | gdkchan <gab.dark.100@gmail.com> | 2024-01-22 17:14:46 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 17:14:46 -0300 |
commit | f241f88558b3fe90d76fc21123bd06b9e4c3d2da (patch) | |
tree | 7135051e6a5dc2227d87724777cb63f76453db58 /src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs | |
parent | 90455a05e6d7fe4305c997f20f76d2411197a182 (diff) |
Add a separate device memory manager (#6153)1.1.1120
* Add a separate device memory manager
* Still need this
* Device writes are always tracked
* Device writes are always tracked (2)
* Rename more instances of gmm to mm
Diffstat (limited to 'src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs b/src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs index 28d42a8b..1477ed91 100644 --- a/src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs +++ b/src/Ryujinx.Graphics.Nvdec/MemoryExtensions.cs @@ -1,23 +1,23 @@ -using Ryujinx.Graphics.Gpu.Memory; +using Ryujinx.Graphics.Device; using System; namespace Ryujinx.Graphics.Nvdec { static class MemoryExtensions { - public static T DeviceRead<T>(this MemoryManager gmm, uint offset) where T : unmanaged + public static T DeviceRead<T>(this DeviceMemoryManager gmm, uint offset) where T : unmanaged { - return gmm.Read<T>((ulong)offset << 8); + return gmm.Read<T>(ExtendOffset(offset)); } - public static ReadOnlySpan<byte> DeviceGetSpan(this MemoryManager gmm, uint offset, int size) + public static ReadOnlySpan<byte> DeviceGetSpan(this DeviceMemoryManager gmm, uint offset, int size) { - return gmm.GetSpan((ulong)offset << 8, size); + return gmm.GetSpan(ExtendOffset(offset), size); } - public static void DeviceWrite(this MemoryManager gmm, uint offset, ReadOnlySpan<byte> data) + public static void DeviceWrite(this DeviceMemoryManager gmm, uint offset, ReadOnlySpan<byte> data) { - gmm.Write((ulong)offset << 8, data); + gmm.Write(ExtendOffset(offset), data); } public static ulong ExtendOffset(uint offset) |