mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-03-15 02:51:09 +00:00
Add max retries to BufferedQuery regardless of the presence of wakeSignal, fixed freezing at character selection screen of Super Mario Party Jamboree
This commit is contained in:
@@ -145,28 +145,13 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||
{
|
||||
long data = _defaultValue;
|
||||
|
||||
if (wakeSignal == null)
|
||||
int iterations = 0;
|
||||
while (WaitingForValue(data) && iterations++ < MaxQueryRetries)
|
||||
{
|
||||
while (WaitingForValue(data))
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
if (wakeSignal != null && WaitingForValue(data))
|
||||
{
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int iterations = 0;
|
||||
while (WaitingForValue(data) && iterations++ < MaxQueryRetries)
|
||||
{
|
||||
data = Marshal.ReadInt64(_bufferMap);
|
||||
if (WaitingForValue(data))
|
||||
{
|
||||
wakeSignal.WaitOne(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (iterations >= MaxQueryRetries)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Gpu, $"Error: Query result {_type} timed out. Took more than {MaxQueryRetries} tries.");
|
||||
wakeSignal.WaitOne(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user