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.
This commit is contained in:
parent
bb6fab2009
commit
ca5ac37cd6
5 changed files with 135 additions and 23 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue