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
|
@ -121,24 +121,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
|||
|
||||
public byte[] GetData()
|
||||
{
|
||||
int size = 0;
|
||||
|
||||
for (int level = 0; level < Info.Levels; level++)
|
||||
{
|
||||
size += Info.GetMipSize(level);
|
||||
}
|
||||
|
||||
byte[] data = new byte[size];
|
||||
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* ptr = data)
|
||||
{
|
||||
WriteTo((IntPtr)ptr);
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
return _renderer.PersistentBuffers.Default.GetTextureData(this);
|
||||
}
|
||||
|
||||
public void WriteToPbo(int offset, bool forceBgra)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue