diff options
author | riperiperi <rhy3756547@hotmail.com> | 2021-07-16 22:10:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 18:10:20 -0300 |
commit | ca5ac37cd638222e7475ac8f632b878126f3462d (patch) | |
tree | 7c550f640c54453ebe61bb0797b8b200a69009bd /Ryujinx.Graphics.OpenGL/Renderer.cs | |
parent | bb6fab200969531ff858de399879779de5aaeac0 (diff) |
Flush buffers and texture data through a persistent mapped buffer. (#2481)
* Use persistent buffers to flush texture data
* Flush buffers via copy to persistent buffers.
* Log error when timing out, small refactoring.
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Renderer.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Renderer.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index 001cac8d..41629c1d 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -30,6 +30,8 @@ namespace Ryujinx.Graphics.OpenGL public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured; + internal PersistentBuffers PersistentBuffers { get; } + internal ResourcePool ResourcePool { get; } internal int BufferCount { get; private set; } @@ -46,6 +48,7 @@ namespace Ryujinx.Graphics.OpenGL _textureCopy = new TextureCopy(this); _backgroundTextureCopy = new TextureCopy(this); _sync = new Sync(); + PersistentBuffers = new PersistentBuffers(); ResourcePool = new ResourcePool(); } @@ -90,7 +93,7 @@ namespace Ryujinx.Graphics.OpenGL public byte[] GetBufferData(BufferHandle buffer, int offset, int size) { - return Buffer.GetData(buffer, offset, size); + return PersistentBuffers.Default.GetBufferData(buffer, offset, size); } public Capabilities GetCapabilities() @@ -177,6 +180,7 @@ namespace Ryujinx.Graphics.OpenGL { _textureCopy.Dispose(); _backgroundTextureCopy.Dispose(); + PersistentBuffers.Dispose(); ResourcePool.Dispose(); _pipeline.Dispose(); _window.Dispose(); |