aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs
diff options
context:
space:
mode:
authormpnico <mpnico@gmail.com>2021-08-26 23:50:28 +0200
committerGitHub <noreply@github.com>2021-08-26 23:50:28 +0200
commit8e1adb95cf7f67b976f105f4cac26d3ff2986057 (patch)
treef56ee0f92495fc1bd1e307c3bd51a2d1240d197b /Ryujinx.Graphics.Gpu/Memory/BufferCache.cs
parent5cab8ea4ad2388bd035150e79f241ae5df95ab3b (diff)
Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557)
* Add support for HLE macros and accelerate MultiDrawElementsIndirectCount * Add missing barrier * Fix index buffer count * Add support check for each macro hle before use * Add missing xml doc Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/BufferCache.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/BufferCache.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs b/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs
index 58dd838e..63d22150 100644
--- a/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/BufferCache.cs
@@ -298,6 +298,18 @@ namespace Ryujinx.Graphics.Gpu.Memory
}
/// <summary>
+ /// Gets a buffer sub-range for a given GPU memory range.
+ /// </summary>
+ /// <param name="memoryManager">GPU memory manager where the buffer is mapped</param>
+ /// <param name="gpuVa">Start GPU virtual address of the buffer</param>
+ /// <param name="size">Size in bytes of the buffer</param>
+ /// <returns>The buffer sub-range for the given range</returns>
+ public BufferRange GetGpuBufferRange(MemoryManager memoryManager, ulong gpuVa, ulong size)
+ {
+ return GetBufferRange(TranslateAndCreateBuffer(memoryManager, gpuVa, size), size);
+ }
+
+ /// <summary>
/// Gets a buffer sub-range starting at a given memory address.
/// </summary>
/// <param name="address">Start address of the memory range</param>