1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-10 16:01:44 +00:00
Ryujinx/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs

31 lines
No EOL
810 B
C#

using System;
namespace Ryujinx.Graphics.Gpu.Memory
{
using CpuMemoryManager = ARMeilleure.Memory.MemoryManager;
class PhysicalMemory
{
private readonly CpuMemoryManager _cpuMemory;
public PhysicalMemory(CpuMemoryManager cpuMemory)
{
_cpuMemory = cpuMemory;
}
public Span<byte> Read(ulong address, ulong size)
{
return _cpuMemory.ReadBytes((long)address, (long)size);
}
public void Write(ulong address, Span<byte> data)
{
_cpuMemory.WriteBytes((long)address, data.ToArray());
}
public (ulong, ulong)[] GetModifiedRanges(ulong address, ulong size, ResourceName name)
{
return _cpuMemory.GetModifiedRanges(address, size, (int)name);
}
}
}