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/Renderer.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/Renderer.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Renderer.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index 41629c1d..561f0684 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -93,7 +93,14 @@ namespace Ryujinx.Graphics.OpenGL public byte[] GetBufferData(BufferHandle buffer, int offset, int size) { - return PersistentBuffers.Default.GetBufferData(buffer, offset, size); + if (HwCapabilities.UsePersistentBufferForFlush) + { + return PersistentBuffers.Default.GetBufferData(buffer, offset, size); + } + else + { + return Buffer.GetData(buffer, offset, size); + } } public Capabilities GetCapabilities() |