From 1a85c9a00bf225d67ca7210b6d7420ecd75d6077 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Thu, 15 Feb 2024 11:26:20 +0000 Subject: [PATCH] Disable delayed counter copy on NVIDIA --- src/Ryujinx.Graphics.OpenGL/Queries/Counters.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Graphics.OpenGL/Queries/Counters.cs b/src/Ryujinx.Graphics.OpenGL/Queries/Counters.cs index 85446878e..ba64b84cc 100644 --- a/src/Ryujinx.Graphics.OpenGL/Queries/Counters.cs +++ b/src/Ryujinx.Graphics.OpenGL/Queries/Counters.cs @@ -82,9 +82,18 @@ namespace Ryujinx.Graphics.OpenGL.Queries public bool QueueCopy(BufferedQuery query) { - _queuedCopies.Add(query); + if (HwCapabilities.Vendor == HwCapabilities.GpuVendor.Nvidia) + { + // NVIDIA seems to make up a rule where query results can't be copied to buffers + // when unrelated query objects are in use. + return false; + } + else + { + _queuedCopies.Add(query); - return true; + return true; + } } public void Dispose()