[GPU] Cancel pending control barriers when the command stream is discarded

Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
This commit is contained in:
ParantezTech 2026-10-06 17:47:34 +03:00
parent 837466cc03
commit 83e1ba5235
1 changed files with 5 additions and 0 deletions

View File

@ -664,12 +664,17 @@ public sealed class CommandStreamQueue
// Drops every submission without stopping admission; the presenter uses it after device loss.
public void DiscardAll()
{
Action[] cancellations;
lock (_gate)
{
_outcome = IdleOutcome.Failed;
DropAllLocked();
cancellations = CancelControlBarriersLocked();
Monitor.PulseAll(_gate);
}
foreach (var cancel in cancellations)
cancel();
}
// A diagnostic view of the blocked heads: their count, the oldest age and one sample.