From 711360f7753b30835541fb1a40b4643194bef03c Mon Sep 17 00:00:00 2001 From: riperiperi Date: Wed, 14 Feb 2024 23:34:27 +0000 Subject: [PATCH] Fix host access reservation for real --- src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs | 8 +------- src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs index 9e8919adc..25e0588ae 100644 --- a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs +++ b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs @@ -115,13 +115,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries public bool ReserveForHostAccess() { - if (_hostAccessReserved > 0) - { - Interlocked.Increment(ref _hostAccessReserved); - return true; - } - - if (IsValueAvailable()) + if (_hostAccessReserved == 0 && IsValueAvailable()) { return false; } diff --git a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs index e30bb3ecc..986a08e35 100644 --- a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs +++ b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs @@ -121,13 +121,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries public bool ReserveForHostAccess() { - if (_hostAccessReserved > 0) - { - Interlocked.Increment(ref _hostAccessReserved); - return true; - } - - if (IsValueAvailable()) + if (_hostAccessReserved == 0 && IsValueAvailable()) { return false; }