From e58b540c4e2a8df460e0e357e3f341842dd59a71 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 31 Dec 2019 00:22:58 -0300 Subject: Add XML documentation to Ryujinx.Graphics.Gpu.Memory --- Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs') diff --git a/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs b/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs index 8f585b0f..7a6b0963 100644 --- a/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs +++ b/Ryujinx.Graphics.Gpu/Memory/PhysicalMemory.cs @@ -4,25 +4,51 @@ namespace Ryujinx.Graphics.Gpu.Memory { using CpuMemoryManager = ARMeilleure.Memory.MemoryManager; + /// + /// Represents physical memory, accessible from the GPU. + /// This is actually working CPU virtual addresses, of memory mapped on the game process. + /// class PhysicalMemory { private readonly CpuMemoryManager _cpuMemory; + /// + /// Creates a new instance of the physical memory. + /// + /// CPU memory manager of the application process public PhysicalMemory(CpuMemoryManager cpuMemory) { _cpuMemory = cpuMemory; } + /// + /// Reads data from the application process. + /// + /// Address to be read + /// Size in bytes to be read + /// The data at the specified memory location public Span Read(ulong address, ulong size) { return _cpuMemory.ReadBytes((long)address, (long)size); } + /// + /// Writes data to the application process. + /// + /// Address to write into + /// Data to be written public void Write(ulong address, Span data) { _cpuMemory.WriteBytes((long)address, data.ToArray()); } + /// + /// Gets the modified ranges for a given range of the application process mapped memory. + /// + /// Start address of the range + /// Size, in bytes, of the range + /// Name of the GPU resource being checked + /// Ranges, composed of address and size, modified by the application process, form the CPU public (ulong, ulong)[] GetModifiedRanges(ulong address, ulong size, ResourceName name) { return _cpuMemory.GetModifiedRanges(address, size, (int)name); -- cgit v1.2.3