Handle indirect draw counts with non-zero draw starts properly (#2593)

This commit is contained in:
gdkchan 2021-08-29 16:52:38 -03:00 committed by GitHub
parent 15e7fe3ac9
commit 82cefc8dd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 14 deletions

View file

@ -139,11 +139,22 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// Reads data from the application process.
/// </summary>
/// <typeparam name="T">Type of the structure</typeparam>
/// <param name="gpuVa">Address to read from</param>
/// <param name="address">Address to read from</param>
/// <returns>The data at the specified memory location</returns>
public T Read<T>(ulong address) where T : unmanaged
{
return MemoryMarshal.Cast<byte, T>(GetSpan(address, Unsafe.SizeOf<T>()))[0];
return _cpuMemory.Read<T>(address);
}
/// <summary>
/// Reads data from the application process, with write tracking.
/// </summary>
/// <typeparam name="T">Type of the structure</typeparam>
/// <param name="address">Address to read from</param>
/// <returns>The data at the specified memory location</returns>
public T ReadTracked<T>(ulong address) where T : unmanaged
{
return _cpuMemory.ReadTracked<T>(address);
}
/// <summary>