From 647de4cd31a82f39d23f92ea4377eeae5817b6c2 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 3 Nov 2022 19:54:30 -0300 Subject: [PATCH] Ensure all pending draws are done before compute dispatch (#3822) --- Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs b/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs index 84de779c5..bc2911748 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs @@ -94,6 +94,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Compute { var memoryManager = _channel.MemoryManager; + // Since we're going to change the state, make sure any pending instanced draws are done. + _3dEngine.PerformDeferredDraws(); + + // Make sure all pending uniform buffer data is written to memory. _3dEngine.FlushUboDirty(); uint qmdAddress = _state.State.SendPcasA;