[GPU] Number command stream submissions in admission order

Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
This commit is contained in:
ParantezTech 2026-10-06 17:47:33 +03:00
parent 3f8649449c
commit 700e9bb684
2 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,7 @@ public sealed class CommandStreamQueue
private readonly GpuCommandInterpreter?[] _interpreters = new GpuCommandInterpreter?[QueueCount];
private int _nextQueue;
private int _submissionCount;
private ulong _admissionOrdinal;
private bool _accepting = true;
private bool _stopping;
private bool _processing;
@ -200,6 +201,7 @@ public sealed class CommandStreamQueue
throw _host.Fatal($"The command stream no longer accepts submissions: queue={submission.QueueId} address=0x{submission.Address:X16}.");
}
submission.AdmissionOrdinal = ++_admissionOrdinal;
_queues[submission.QueueId].AddLast(submission);
_submissionCount++;
if (submission.Kind is not (CommandSubmissionKind.FlipPreparation or CommandSubmissionKind.FrameBoundary))

View File

@ -101,6 +101,8 @@ public sealed class CommandSubmission
// The submitter's own sequence number, kept for diagnostics and the translation state.
public ulong SubmissionId { get; }
internal ulong AdmissionOrdinal { get; set; }
// Snapshots captured at submit time; the processor never reads them.
public object? GeometrySnapshots { get; }