aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
index 764ba239..95763910 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
@@ -1,5 +1,6 @@
using Ryujinx.Graphics.Device;
using Ryujinx.Graphics.GAL;
+using Ryujinx.Graphics.Gpu.Engine.GPFifo;
using Ryujinx.Graphics.Gpu.Engine.InlineToMemory;
using System;
using System.Collections.Generic;
@@ -13,6 +14,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
class ThreedClass : IDeviceState
{
private readonly GpuContext _context;
+ private readonly GPFifoClass _fifoClass;
private readonly DeviceStateWithShadow<ThreedClassState> _state;
private readonly InlineToMemoryClass _i2mClass;
@@ -26,9 +28,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
/// </summary>
/// <param name="context">GPU context</param>
/// <param name="channel">GPU channel</param>
- public ThreedClass(GpuContext context, GpuChannel channel)
+ public ThreedClass(GpuContext context, GpuChannel channel, GPFifoClass fifoClass)
{
_context = context;
+ _fifoClass = fifoClass;
_state = new DeviceStateWithShadow<ThreedClassState>(new Dictionary<string, RwCallback>
{
{ nameof(ThreedClassState.LaunchDma), new RwCallback(LaunchDma, null) },
@@ -114,6 +117,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
/// </summary>
public void UpdateState()
{
+ _fifoClass.CreatePendingSyncs();
_cbUpdater.FlushUboDirty();
_stateUpdater.Update();
}
@@ -173,6 +177,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
}
/// <summary>
+ /// Create any syncs from WaitForIdle command that are currently pending.
+ /// </summary>
+ public void CreatePendingSyncs()
+ {
+ _fifoClass.CreatePendingSyncs();
+ }
+
+ /// <summary>
/// Flushes any queued UBO updates.
/// </summary>
public void FlushUboDirty()