diff --git a/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs b/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs index d0a0de6..cd25cc7 100644 --- a/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs +++ b/src/SharpEmu.Libs/Gpu/GpuCommands/CommandStreamQueue.cs @@ -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)) diff --git a/src/SharpEmu.Libs/Gpu/GpuCommands/CommandSubmission.cs b/src/SharpEmu.Libs/Gpu/GpuCommands/CommandSubmission.cs index 701022d..5ec2b47 100644 --- a/src/SharpEmu.Libs/Gpu/GpuCommands/CommandSubmission.cs +++ b/src/SharpEmu.Libs/Gpu/GpuCommands/CommandSubmission.cs @@ -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; }