aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2021-07-16 22:10:20 +0100
committerGitHub <noreply@github.com>2021-07-16 18:10:20 -0300
commitca5ac37cd638222e7475ac8f632b878126f3462d (patch)
tree7c550f640c54453ebe61bb0797b8b200a69009bd /Ryujinx.Graphics.OpenGL/Image/TextureView.cs
parentbb6fab200969531ff858de399879779de5aaeac0 (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/Image/TextureView.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Image/TextureView.cs19
1 files changed, 1 insertions, 18 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Image/TextureView.cs b/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
index 8e8d3c78..770e99a0 100644
--- a/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
+++ b/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
@@ -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)