diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-07-19 16:02:51 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-07-19 16:02:51 -0300 |
| commit | 5fe0bc584b21c660e083a9cb37aa0a8be4719f95 (patch) | |
| tree | 1d8a1e44d379d03a0d967a92475756d05a9e62e2 /ChocolArm64/Memory | |
| parent | 45bb24dbae7b4fb4118036aa74024605995510fd (diff) | |
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
Diffstat (limited to 'ChocolArm64/Memory')
| -rw-r--r-- | ChocolArm64/Memory/AMemory.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ChocolArm64/Memory/AMemory.cs b/ChocolArm64/Memory/AMemory.cs index da5cf007..054277b2 100644 --- a/ChocolArm64/Memory/AMemory.cs +++ b/ChocolArm64/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); |
