aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2019-12-25 20:28:17 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit647d0962df5b54334af965b88f784409afbf6223 (patch)
tree3cd884099188341f869919c8235deecdea96be9b /Ryujinx.HLE/HOS/Services
parent6cf9a04d981a9e966cccb0dc90182e29aac7e270 (diff)
Initialize GPU physical memory accessor from KProcess, to allow homebrew that never maps anything on the GPU to work
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/AddressSpaceContext.cs34
1 files changed, 0 insertions, 34 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/AddressSpaceContext.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/AddressSpaceContext.cs
index bca9ba7c..951994ef 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/AddressSpaceContext.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/Types/AddressSpaceContext.cs
@@ -40,44 +40,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu.Types
public MemoryManager Gmm { get; }
- private class MemoryProxy : IPhysicalMemory
- {
- private ARMeilleure.Memory.MemoryManager _cpuMemory;
-
- public MemoryProxy(ARMeilleure.Memory.MemoryManager 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);
- }
-
- public int GetPageSize()
- {
- return 4096;
- }
- }
-
public AddressSpaceContext(ServiceCtx context)
{
Gmm = context.Device.Gpu.MemoryManager;
- var memoryProxy = new MemoryProxy(context.Process.CpuMemory);
-
- context.Device.Gpu.SetVmm(memoryProxy);
-
_maps = new SortedList<long, Range>();
_reservations = new SortedList<long, Range>();
}