From 5fe0bc584b21c660e083a9cb37aa0a8be4719f95 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 19 Jul 2018 16:02:51 -0300 Subject: Send data to OpenGL host without client-side copies (#285) * Directly send host address to buffer data * Cleanup OGLShader * Directly copy vertex and index data too * Revert shader bind "cache" * Address feedback --- Ryujinx.HLE/Gpu/Memory/NvGpuVmm.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Ryujinx.HLE/Gpu/Memory') diff --git a/Ryujinx.HLE/Gpu/Memory/NvGpuVmm.cs b/Ryujinx.HLE/Gpu/Memory/NvGpuVmm.cs index 0c81dd15..7b23e49f 100644 --- a/Ryujinx.HLE/Gpu/Memory/NvGpuVmm.cs +++ b/Ryujinx.HLE/Gpu/Memory/NvGpuVmm.cs @@ -1,5 +1,6 @@ using ChocolArm64.Memory; using Ryujinx.Graphics.Gal; +using System; using System.Collections.Concurrent; namespace Ryujinx.HLE.Gpu.Memory @@ -279,6 +280,11 @@ namespace Ryujinx.HLE.Gpu.Memory return Cache.IsRegionModified(Memory, BufferType, PA, Size); } + public IntPtr GetHostAddress(long Position, long Size) + { + return Memory.GetHostAddress(GetPhysicalAddress(Position), Size); + } + public byte ReadByte(long Position) { Position = GetPhysicalAddress(Position); -- cgit v1.2.3