diff options
author | riperiperi <rhy3756547@hotmail.com> | 2021-07-18 15:45:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-18 11:45:50 -0300 |
commit | 10e17ab423ba84856eb7411ce04d38989ac70a58 (patch) | |
tree | 80fa24a8db3f5949fac8cc28873d82280e93328e /Ryujinx.Graphics.OpenGL/PersistentBuffers.cs | |
parent | b8ad676fb8cbe0a43617df41daaf284ab4421c75 (diff) |
Only use persistent buffers to flush on NVIDIA and Windows+AMD (#2489)
It seems like this method of flushing data is much slower on Mesa drivers, and slightly slower on Intel Windows. Have not tested Intel Mesa, but I'm assuming it is the same as AMD.
This also adds vendor detection for AMD on Unix, which counted as "Unknown" before.
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/PersistentBuffers.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/PersistentBuffers.cs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs b/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs index a7cefca3..740f8b98 100644 --- a/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs +++ b/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs @@ -63,15 +63,8 @@ namespace Ryujinx.Graphics.OpenGL GL.DeleteSync(sync); } - public byte[] GetTextureData(TextureView view) + public byte[] GetTextureData(TextureView view, int size) { - int size = 0; - - for (int level = 0; level < view.Info.Levels; level++) - { - size += view.Info.GetMipSize(level); - } - EnsureBuffer(size); GL.BindBuffer(BufferTarget.PixelPackBuffer, _copyBufferHandle); |