Replay: --skip-clamps and --batch-clamps read a capture's batched clamp passes (VICTORY_INDIRECT_BATCH, play.ps1's default) as plain ones #621

Open
opened 2026-11-27 14:24:44 +00:00 by github-bot · 0 comments
Owner

@⁠adrianmjim on GitHub · 2026-11-27 14:23 UTC · original

On a capture recorded with the settings of scripts/play.ps1, victory replay --skip-clamps stops with an error that does not say what is wrong, and --batch-clamps runs but draws another picture. Both take the capture's clamp passes for unbatched ones; with VICTORY_INDIRECT_BATCH=2 (which play.ps1 sets, L21) they are already batched.

Machine: RX 7900 XT (RDNA 3), driver 32.0.32029.2010, Windows 11 26300, a-publier 4eb6cfd, diag build with diagnostics. The replays ran on 4eb6cfd plus #550, without which no replay of this capture loads on this card. One capture: a world frame of the opening sequence, Series S, recorded on 4eb6cfd with VICTORY_INDIRECT_BATCH=2 (39 submissions, 274 lists, 1,024 pipelines).

What happens

  • replay <capture> --skip-clamps --loops 3: no report, and
    Error: clamp capture has no completed scratch transition in its command list.
    It is the same with #550 alone and with my other replay changes on top (#551 among them).
  • replay <capture> --batch-clamps --loops 3: it runs. The note says --batch-clamps: 118 clamp passes became 68, of 0 records, and the picture is 47.8 dB against the presented one. Runs of the recorded commands give 57.2-59.3 dB, or more in a run's first loop (172 loops in 15 runs).

One run of each.

Why, by the code and the capture's --listing

  • The host names both clamp pipelines alike. make_from names what it makes victory: argument clamp (indirect.rs#L356), and it makes the plain clamp (L263) and the batched one (L559).
  • The replay finds clamp passes by that name (play.rs#L40, L2048, L2196) and reads each as a plain one: the root view at parameter 3 is where it writes (edit.rs#L175).
  • The batched pass has another root signature: four sources, the jobs, then the arguments and the budget it writes (indirect/batch.rs#L33-L43). Its parameter 3 is the fourth source.
  • In this capture's listing one pipeline has that name, and all 118 of its dispatches have the batched layout: root views at parameters 0-4 of one kind and 5-6 of another.
  • So keep_clamped (edit.rs#L220) waits for a source buffer to be moved to the indirect-argument state. The listing has 118 transitions to that state. All are of the 39 buffers bound at parameter 5 of a clamp pass (the arguments it writes), and none is of the 48 bound at parameter 3. So no clamp gets its copy, and the check at the end fails with the message above.
  • --batch-clamps puts passes that are already batches into batches again. I did not trace what it then runs; "of 0 records" and the picture say it is not the same work.

What it means

With play.ps1's settings these two experiments cannot be used on a capture, and one of them fails without saying so. docs/replay.md describes --batch-clamps as doing what VICTORY_INDIRECT_BATCH does, which suggests a capture recorded with VICTORY_INDIRECT_BATCH=0. I have not recorded one.

Two ways I can see, and I can send a PR for either:

  • the batched pipeline gets a name of its own, the replay counts both kinds as argument clamps in its timing, edits only the plain ones and notes how many batched passes it left alone;
  • or the two switches refuse a capture whose clamp passes are batched, and say why.

Not checked

  • A capture recorded with VICTORY_INDIRECT_BATCH=0 or =1.
  • Any other card, or a second capture.
  • Whether a capture can hold both kinds (this one holds only batched passes).
**@⁠adrianmjim** on GitHub · 2026-11-27 14:23 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/621) On a capture recorded with the settings of `scripts/play.ps1`, `victory replay --skip-clamps` stops with an error that does not say what is wrong, and `--batch-clamps` runs but draws another picture. Both take the capture's clamp passes for unbatched ones; with `VICTORY_INDIRECT_BATCH=2` (which `play.ps1` sets, [L21](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/scripts/play.ps1#L21)) they are already batched. Machine: RX 7900 XT (RDNA 3), driver 32.0.32029.2010, Windows 11 26300, a-publier 4eb6cfd, diag build with diagnostics. The replays ran on 4eb6cfd plus #550, without which no replay of this capture loads on this card. One capture: a world frame of the opening sequence, Series S, recorded on 4eb6cfd with `VICTORY_INDIRECT_BATCH=2` (39 submissions, 274 lists, 1,024 pipelines). ## What happens - `replay <capture> --skip-clamps --loops 3`: no report, and `Error: clamp capture has no completed scratch transition in its command list`. It is the same with #550 alone and with my other replay changes on top (#551 among them). - `replay <capture> --batch-clamps --loops 3`: it runs. The note says `--batch-clamps: 118 clamp passes became 68, of 0 records`, and the picture is 47.8 dB against the presented one. Runs of the recorded commands give 57.2-59.3 dB, or more in a run's first loop (172 loops in 15 runs). One run of each. ## Why, by the code and the capture's `--listing` - The host names both clamp pipelines alike. `make_from` names what it makes `victory: argument clamp` ([indirect.rs#L356](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/indirect.rs#L356)), and it makes the plain clamp ([L263](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/indirect.rs#L263)) and the batched one ([L559](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/indirect.rs#L559)). - The replay finds clamp passes by that name ([play.rs#L40](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/replay/play.rs#L40), [L2048](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/replay/play.rs#L2048), [L2196](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/replay/play.rs#L2196)) and reads each as a plain one: the root view at parameter 3 is where it writes ([edit.rs#L175](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/replay/edit.rs#L175)). - The batched pass has another root signature: four sources, the jobs, then the arguments and the budget it writes ([indirect/batch.rs#L33-L43](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/indirect/batch.rs#L33-L43)). Its parameter 3 is the fourth source. - In this capture's listing one pipeline has that name, and all 118 of its dispatches have the batched layout: root views at parameters 0-4 of one kind and 5-6 of another. - So `keep_clamped` ([edit.rs#L220](https://github.com/Belobug/VIctory-Belobug-AMD/blob/4eb6cfd/crates/victory-gpu/src/replay/edit.rs#L220)) waits for a source buffer to be moved to the indirect-argument state. The listing has 118 transitions to that state. All are of the 39 buffers bound at parameter 5 of a clamp pass (the arguments it writes), and none is of the 48 bound at parameter 3. So no clamp gets its copy, and the check at the end fails with the message above. - `--batch-clamps` puts passes that are already batches into batches again. I did not trace what it then runs; "of 0 records" and the picture say it is not the same work. ## What it means With `play.ps1`'s settings these two experiments cannot be used on a capture, and one of them fails without saying so. `docs/replay.md` describes `--batch-clamps` as doing what `VICTORY_INDIRECT_BATCH` does, which suggests a capture recorded with `VICTORY_INDIRECT_BATCH=0`. I have not recorded one. Two ways I can see, and I can send a PR for either: - the batched pipeline gets a name of its own, the replay counts both kinds as argument clamps in its timing, edits only the plain ones and notes how many batched passes it left alone; - or the two switches refuse a capture whose clamp passes are batched, and say why. ## Not checked - A capture recorded with `VICTORY_INDIRECT_BATCH=0` or `=1`. - Any other card, or a second capture. - Whether a capture can hold both kinds (this one holds only batched passes).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 14:24:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.