From 837466cc035cae73d10d97875350bf2279b3cb48 Mon Sep 17 00:00:00 2001 From: ParantezTech <12572227+par274@users.noreply.github.com> Date: Tue, 6 Oct 2026 17:47:33 +0300 Subject: [PATCH] [GPU] Cancel pending control barriers when the command stream fails Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com> --- src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs b/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs index 907eb38..918a128 100644 --- a/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs +++ b/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs @@ -336,10 +336,15 @@ public sealed class CommandStreamQueue // Publishes a failure: nothing runs any more and every waiter is released with Failed. public void Fail() { + Action[] cancellations; lock (_gate) { FailLocked(); + cancellations = CancelControlBarriersLocked(); } + + foreach (var cancel in cancellations) + cancel(); } private void FailLocked()