Fix host access reservation for real

This commit is contained in:
riperiperi 2024-02-14 23:34:27 +00:00
parent 0aa6b31b39
commit 711360f775
2 changed files with 2 additions and 14 deletions

View file

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

View file

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