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.
This commit is contained in:
riperiperi 2021-07-18 15:45:50 +01:00 committed by GitHub
parent b8ad676fb8
commit 10e17ab423
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 14 deletions

View file

@ -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);