docs: the diagnostic switches native-host.md did not list (#485) #486

Merged
AnastasisKon merged 1 commit from upstream-pr/486 into main 2026-11-28 01:36:01 +00:00
AnastasisKon commented 2026-11-27 22:07:00 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T22:07:00Z.


What this changes

Refs #485.

docs/native-host.md's "Bring-up diagnostics" list is missing six switches the code reads today, so a tester cannot find them and someone changing one cannot see who depends on it. This adds them, each written from the code that reads it rather than from the switch's name:

  • VICTORY_DSTORAGE_LOG (any build): the 3 s dstorage state line — staging bytes against the limit, and each lane still holding work with its unsubmitted, held, reads, statuses, running and capacity counts (victory-hle/src/modules/dstorage.rs:581). Note what it does not print: a lane's failures, and the field is labelled cap, not "capacity".
  • VICTORY_FRAME_DUMP=<seconds>,<file.ppm>: once, that many seconds in, the last presented frame as a PPM, with the frame count and the shader work refused so far (apps/victory/src/native_run.rs:357).
  • VICTORY_DUMP_WRITERS=<substr>,...: acts through the capture, so it needs VICTORY_DUMP_TARGETS set; a written buffer's first 64 MiB is read when first bound and reported at the present by dwords changed and not zero, and such a pipeline's textures are dumped with the frame it first runs in (victory-gpu/src/capture.rs:236, :291).
  • VICTORY_PIPELINE_LOG=<file> (diagnostics build): creates the file (truncating whatever was there) and writes one tab-separated line per pipeline key — created, used, built (victory-gpu/src/pipeline/make.rs:137).
  • VICTORY_TRACE_SHADERS=<hash substring>,... (diagnostics build): a noted command whose shader hash contains one of them is logged with everything it binds, all of them in a listed capture frame and the first 500 elsewhere (victory-gpu/src/host.rs:3653, :3680).
  • VICTORY_GPU_TIMING=1 (diagnostics build): GPU time per kind of command and pipeline, each list's wall time against the sum of its commands', and the commands of a list during which the device was found removed (victory-gpu/src/host.rs:336, :3684).

docs/macos.md drops the claim that VICTORY_STACKS_FILE needs a build with VICTORY_DIAGNOSTICS=1 — stacks.rs reads it in any build, which is what the VICTORY_STACKS freeze diagnosis in #50 relies on.

VICTORY_DUMP_REGISTRY was already documented, and correctly (the subsystem registry at the first title int3), so it is not repeated.

Docs only: no code, no behaviour change, no new switch.

How it was tested

  • cargo xtask policy: 398 files ok.
  • Every sentence traced to the line named above; nothing written from a switch's name.
  • cargo test / clippy: not run — two Markdown files change, no Rust. Say the word and I will run the full gate anyway.
  • Ran the game: not needed (docs).

Checklist

  • No game files, game code, disassembly listings or SDK files are included
  • Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md: none added — these entries describe switches, not console behaviour
  • New diagnostics are behind a VICTORY_* variable and documented: no new switch, six already-existing ones now documented
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:5533712193 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/486). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T22:07:00Z. --- ## What this changes Refs #485. `docs/native-host.md`'s "Bring-up diagnostics" list is missing six switches the code reads today, so a tester cannot find them and someone changing one cannot see who depends on it. This adds them, each written from the code that reads it rather than from the switch's name: - `VICTORY_DSTORAGE_LOG` (any build): the 3 s `dstorage state` line — staging bytes against the limit, and each lane still holding work with its unsubmitted, held, reads, statuses, running and capacity counts (`victory-hle/src/modules/dstorage.rs:581`). Note what it does *not* print: a lane's `failures`, and the field is labelled `cap`, not "capacity". - `VICTORY_FRAME_DUMP=<seconds>,<file.ppm>`: once, that many seconds in, the last presented frame as a PPM, with the frame count and the shader work refused so far (`apps/victory/src/native_run.rs:357`). - `VICTORY_DUMP_WRITERS=<substr>,...`: acts through the capture, so it needs `VICTORY_DUMP_TARGETS` set; a written buffer's first 64 MiB is read when first bound and reported at the present by dwords changed and not zero, and such a pipeline's textures are dumped with the frame it first runs in (`victory-gpu/src/capture.rs:236`, `:291`). - `VICTORY_PIPELINE_LOG=<file>` (diagnostics build): **creates** the file (truncating whatever was there) and writes one tab-separated line per pipeline key — `created`, `used`, `built` (`victory-gpu/src/pipeline/make.rs:137`). - `VICTORY_TRACE_SHADERS=<hash substring>,...` (diagnostics build): a noted command whose shader hash contains one of them is logged with everything it binds, all of them in a listed capture frame and the first 500 elsewhere (`victory-gpu/src/host.rs:3653`, `:3680`). - `VICTORY_GPU_TIMING=1` (diagnostics build): GPU time per kind of command and pipeline, each list's wall time against the sum of its commands', and the commands of a list during which the device was found removed (`victory-gpu/src/host.rs:336`, `:3684`). `docs/macos.md` drops the claim that `VICTORY_STACKS_FILE` needs a build with `VICTORY_DIAGNOSTICS=1` — `stacks.rs` reads it in any build, which is what the `VICTORY_STACKS` freeze diagnosis in #50 relies on. `VICTORY_DUMP_REGISTRY` was already documented, and correctly (the subsystem registry at the first title `int3`), so it is not repeated. Docs only: no code, no behaviour change, no new switch. ## How it was tested - [x] `cargo xtask policy`: 398 files ok. - [x] Every sentence traced to the line named above; nothing written from a switch's name. - [ ] `cargo test` / clippy: not run — two Markdown files change, no Rust. Say the word and I will run the full gate anyway. - [ ] Ran the game: not needed (docs). ## Checklist - [x] No game files, game code, disassembly listings or SDK files are included - [x] Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md: none added — these entries describe switches, not console behaviour - [x] New diagnostics are behind a `VICTORY_*` variable and documented: no new switch, six already-existing ones now documented
Olima34 commented 2026-11-28 01:35:58 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:35:58Z.

Review: APPROVED


Check report (helping the maintainer clear the queue):

  • CI: check and macos-scripts green on the current head.
  • Read: the whole diff (docs only). Each switch it adds is in the code it names (VICTORY_DSTORAGE_LOG in dstorage.rs, VICTORY_FRAME_DUMP in native_run.rs, VICTORY_DUMP_WRITERS in capture.rs, VICTORY_PIPELINE_LOG, VICTORY_TRACE_SHADERS). The VICTORY_STACKS_FILE fix matches stacks.rs.
  • Local check: current main (226645f9) merged with this PR and the other test/docs/tools PRs we're landing in this batch (#397 #399 #422 #467 #471 #475 #479 #481 #486 #489 #494 #498 #505 #511). On it, the victory-gpu (arm64), victory-shader, victory-backend, victory-metal and victory tests pass, as do the macOS script tests (rustup-path.sh, run-summary-compare.sh, run-summary.sh --self-test), Windows clippy (-D warnings) and cargo xtask policy. One victory-gpu run in four failed main's own multi_mip_array_and_placed_depth_twins_preserve_all_subresources_and_remirror_immediately. That test also flakes on main alone, so it isn't from this batch.
  • Not checked: no game run (the maintainer asked us to work on GitHub only).

Thanks @AnastasisKon!

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:review:6094923672 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/486#pullrequestreview-6094923672). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-28T01:35:58Z. **Review:** APPROVED --- Check report (helping the maintainer clear the queue): - **CI:** `check` and `macos-scripts` green on the current head. - **Read:** the whole diff (docs only). Each switch it adds is in the code it names (`VICTORY_DSTORAGE_LOG` in dstorage.rs, `VICTORY_FRAME_DUMP` in native_run.rs, `VICTORY_DUMP_WRITERS` in capture.rs, `VICTORY_PIPELINE_LOG`, `VICTORY_TRACE_SHADERS`). The `VICTORY_STACKS_FILE` fix matches `stacks.rs`. - **Local check:** current main (226645f9) merged with this PR and the other test/docs/tools PRs we're landing in this batch (#397 #399 #422 #467 #471 #475 #479 #481 #486 #489 #494 #498 #505 #511). On it, the `victory-gpu` (arm64), `victory-shader`, `victory-backend`, `victory-metal` and `victory` tests pass, as do the macOS script tests (`rustup-path.sh`, `run-summary-compare.sh`, `run-summary.sh --self-test`), Windows clippy (`-D warnings`) and `cargo xtask policy`. One `victory-gpu` run in four failed main's own `multi_mip_array_and_placed_depth_twins_preserve_all_subresources_and_remirror_immediately`. That test also flakes on main alone, so it isn't from this batch. - **Not checked:** no game run (the maintainer asked us to work on GitHub only). Thanks @AnastasisKon!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS!486
No description provided.