From 71a22fc2be3ee353836f211e0f76e2f71a166b0e Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 07:26:43 -0800 Subject: [PATCH] command-replay: a play that ends with differing IDs exits 3 with an ids line, apart from a stopped run A run that played every frame but whose objects' gpuResourceID differ from the recording's exited 1 with an 'error ids' line, the status of a run that stopped: two clean plays read as crashes. It now ends 'ids: played to the end; ...' and exits 3; docs/REPLAY-STREAM.md says so. --- crates/metal2vulkan-validation/src/bin/command-replay.rs | 7 +++++-- docs/REPLAY-STREAM.md | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/crates/metal2vulkan-validation/src/bin/command-replay.rs b/crates/metal2vulkan-validation/src/bin/command-replay.rs index b836a64e1..168f2a053 100644 --- a/crates/metal2vulkan-validation/src/bin/command-replay.rs +++ b/crates/metal2vulkan-validation/src/bin/command-replay.rs @@ -406,11 +406,14 @@ fn run( report.line(&format!("gaps {}", gaps.join(" "))); } match ended { + // Played to the end, the IDs a shader reads differing from the program's: no fault, hang + // or refusal, its own status. Ok(()) if differing_ids > 0 => { report.line(&format!( - "error ids: {differing_ids} objects' gpuResourceID differ from the recording's{note}" + "ids: played to the end; {differing_ids} objects' gpuResourceID differ from the \ + recording's{note}" )); - 1 + 3 } Ok(()) => { report.line(&format!("ok{note}")); diff --git a/docs/REPLAY-STREAM.md b/docs/REPLAY-STREAM.md index f193b9249..3498ef80b 100644 --- a/docs/REPLAY-STREAM.md +++ b/docs/REPLAY-STREAM.md @@ -637,9 +637,11 @@ and `C` the first one's frame and stream position), `cut SEGMENT OFFSET` where t in a record cut short, `skipped KEY=VALUE ...: no gate result` where the backend skipped anything, `gaps KEY=VALUE ...` where it met a typed gap (`gap_pipeline_ids`: the compute pipeline states whose `gpuResourceID` the player asked, which the new runtime does not give), -then `ok` or `error WHAT`. Where the backend skipped anything, the `skipped` line and the last +then `ok`, `ids: played to the end; N objects' gpuResourceID differ from the recording's` where +the play ended but objects whose ID the program saw have other IDs in the runtime, or +`error WHAT`. Where the backend skipped anything, the `skipped` line and the last one end `; not a verdict past frame F, call C`: `F` and `C` the frame and stream position of the call at which it first skipped, past which nothing the play shows is a verdict. A dispatch is skipped only where it names a skipped object. `COUNTS` is `stream KEY=VALUE ... executed -KEY=VALUE ...`. The exit status is 0 for `ok`, 1 for a run that stopped and 2 for a harness -failure (a bad command line or an unreadable stream). +KEY=VALUE ...`. The exit status is 0 for `ok`, 1 for a run that stopped, 2 for a harness +failure (a bad command line or an unreadable stream) and 3 for `ids`, a run that played to the end.