Fix deadlocks
This commit is contained in:
parent
59a5fb397f
commit
9415b2862f
3 changed files with 6 additions and 10 deletions
|
@ -19,7 +19,7 @@ namespace Ryujinx.HLE.Gpu.Engines
|
|||
|
||||
private NvGpuEngine[] SubChannels;
|
||||
|
||||
public ManualResetEvent Event { get; private set; }
|
||||
public AutoResetEvent Event { get; private set; }
|
||||
|
||||
private struct CachedMacro
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.HLE.Gpu.Engines
|
|||
|
||||
Mme = new int[MmeWords];
|
||||
|
||||
Event = new ManualResetEvent(false);
|
||||
Event = new AutoResetEvent(false);
|
||||
}
|
||||
|
||||
public void PushBuffer(NvGpuVmm Vmm, NvGpuPBEntry[] Buffer)
|
||||
|
|
|
@ -73,14 +73,12 @@ namespace Ryujinx.HLE
|
|||
|
||||
public bool WaitFifo()
|
||||
{
|
||||
return Gpu.Fifo.Event.WaitOne(1);
|
||||
return Gpu.Fifo.Event.WaitOne(8);
|
||||
}
|
||||
|
||||
public void ProcessFrame()
|
||||
{
|
||||
Gpu.Fifo.DispatchCalls();
|
||||
|
||||
Gpu.Fifo.Event.Reset();
|
||||
}
|
||||
|
||||
internal virtual void OnFinish(EventArgs e)
|
||||
|
|
|
@ -59,15 +59,13 @@ namespace Ryujinx
|
|||
|
||||
while (!IsExiting)
|
||||
{
|
||||
//Sleeping until Fifo event improves performance, but it deadlocks most games
|
||||
//should not be uncommented until it's found why it happens
|
||||
//if (Ns.WaitFifo())
|
||||
if (Ns.WaitFifo())
|
||||
{
|
||||
Ns.ProcessFrame();
|
||||
|
||||
Renderer.RunActions();
|
||||
}
|
||||
|
||||
Renderer.RunActions();
|
||||
|
||||
Ticks += Chrono.ElapsedTicks;
|
||||
|
||||
Chrono.Restart();
|
||||
|
|
Loading…
Add table
Reference in a new issue