From 34ebf2acbe626d467a0a789d6cd9263880bdb1ef Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 19 Jul 2018 16:02:51 -0300 Subject: [PATCH] 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 --- Memory/AMemory.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Memory/AMemory.cs b/Memory/AMemory.cs index da5cf00..054277b 100644 --- a/Memory/AMemory.cs +++ b/Memory/AMemory.cs @@ -204,6 +204,13 @@ namespace ChocolArm64.Memory return Modified; } + public IntPtr GetHostAddress(long Position, long Size) + { + EnsureRangeIsValid(Position, Size, AMemoryPerm.Read); + + return (IntPtr)(RamPtr + (ulong)Position); + } + public sbyte ReadSByte(long Position) { return (sbyte)ReadByte(Position);