Remove GPU MemoryAccessor (#1423)

* Remove GPU MemoryAccessor

* Update outdated XML doc

* Update more outdated stuff
This commit is contained in:
gdkchan 2020-07-25 03:39:45 -03:00 committed by GitHub
parent 80d4199fb3
commit 111534a74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 114 deletions

View file

@ -62,7 +62,6 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <summary>
/// Gets a read-only span of data from GPU mapped memory.
/// This reads as much data as possible, up to the specified maximum size.
/// </summary>
/// <param name="gpuVa">GPU virtual address where the data is located</param>
/// <param name="size">Size of the data</param>
@ -87,6 +86,19 @@ namespace Ryujinx.Graphics.Gpu.Memory
return _context.PhysicalMemory.GetWritableRegion(processVa, size);
}
/// <summary>
/// Writes data to GPU mapped memory.
/// </summary>
/// <typeparam name="T">Type of the data</typeparam>
/// <param name="gpuVa">GPU virtual address to write the value into</param>
/// <param name="value">The value to be written</param>
public void Write<T>(ulong gpuVa, T value) where T : unmanaged
{
ulong processVa = Translate(gpuVa);
_context.PhysicalMemory.Write(processVa, MemoryMarshal.Cast<T, byte>(MemoryMarshal.CreateSpan(ref value, 1)));
}
/// <summary>
/// Writes data to GPU mapped memory.
/// </summary>