mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-26 15:09:17 +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;
|
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);
|
wakeSignal.WaitOne(0);
|
||||||
}
|
|
||||||
}
|
|
||||||
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.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user