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:
@ -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)
|
||||
|
Reference in New Issue
Block a user