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

Manually merged
github merged 1 commit from github-bot/gh-486 into main 2026-11-28 01:36:54 +00:00 AGit
Owner

@⁠AnastasisKon on GitHub · 2026-11-27 22:07 UTC · original
AnastasisKon:vibe/doc-diagnostic-switches-4f9c68 → main · +5 −1 · 2 files · 1 commits · merged 2026-11-28 01:36 UTC

What this changes

Refs #489.

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
**@⁠AnastasisKon** on GitHub · 2026-11-27 22:07 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/486) `AnastasisKon:vibe/doc-diagnostic-switches-4f9c68` → `main` · +5 −1 · 2 files · 1 commits · merged 2026-11-28 01:36 UTC ## What this changes Refs #489. `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
Six switches the code reads were documented nowhere: VICTORY_DSTORAGE_LOG,
VICTORY_FRAME_DUMP, VICTORY_DUMP_WRITERS, VICTORY_PIPELINE_LOG,
VICTORY_TRACE_SHADERS and VICTORY_GPU_TIMING. Each entry was written from
the code that reads it, not from the switch's name: VICTORY_PIPELINE_LOG
creates (truncates) its file and exists only in a diagnostics build,
VICTORY_DUMP_WRITERS acts through VICTORY_DUMP_TARGETS, VICTORY_GPU_TIMING
reports per-kind GPU time against each list's wall time, and
VICTORY_DSTORAGE_LOG prints a lane's capacity rather than its failures.

docs/macos.md drops the claim that VICTORY_STACKS_FILE needs
VICTORY_DIAGNOSTICS=1: stacks.rs reads it in any build.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 22:11:26 +00:00
github manually merged commit 829f18bde0 into main 2026-11-28 01:36:54 +00:00
Author
Owner

@⁠Olima34 on GitHub · 2026-11-28 01:35 UTC · original · approved these changes

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 (#401 #403 #426 #471 #475 #479 #483 #485 #490 #493 #498 #502 #509 #515). 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!

**@⁠Olima34** on GitHub · 2026-11-28 01:35 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/486#pullrequestreview-6094923672) · **approved these changes** 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 (#401 #403 #426 #471 #475 #479 #483 #485 #490 #493 #498 #502 #509 #515). 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!
This discussion has been locked. Commenting is limited to contributors.
No description provided.