From 8e1adb95cf7f67b976f105f4cac26d3ff2986057 Mon Sep 17 00:00:00 2001 From: mpnico Date: Thu, 26 Aug 2021 23:50:28 +0200 Subject: 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 --- Ryujinx.Graphics.Gpu/Memory/BufferCache.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Memory') 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 @@ -297,6 +297,18 @@ namespace Ryujinx.Graphics.Gpu.Memory buffer.SignalModified(address, size); } + /// + /// Gets a buffer sub-range for a given GPU memory range. + /// + /// GPU memory manager where the buffer is mapped + /// Start GPU virtual address of the buffer + /// Size in bytes of the buffer + /// The buffer sub-range for the given range + public BufferRange GetGpuBufferRange(MemoryManager memoryManager, ulong gpuVa, ulong size) + { + return GetBufferRange(TranslateAndCreateBuffer(memoryManager, gpuVa, size), size); + } + /// /// Gets a buffer sub-range starting at a given memory address. /// -- cgit v1.2.3