docs: the diagnostic switches native-host.md did not list #489

Open
opened 2026-11-27 22:11:24 +00:00 by github-bot · 4 comments
Owner

@⁠AnastasisKon on GitHub · 2026-11-27 22:06 UTC · original

What

docs/native-host.md's "Bring-up diagnostics" list is missing switches the code reads today, so a tester reading the docs cannot find them and someone changing them cannot see who depends on them. Six were undocumented: VICTORY_DSTORAGE_LOG, VICTORY_FRAME_DUMP, VICTORY_DUMP_WRITERS, VICTORY_PIPELINE_LOG, VICTORY_TRACE_SHADERS, VICTORY_GPU_TIMING.

docs/macos.md also says VICTORY_STACKS_FILE needs a build with VICTORY_DIAGNOSTICS=1, which is not true any more: stacks.rs reads it in any build.

What the entries say, and where each was checked

  • VICTORY_DSTORAGE_LOG (any build): the 3 s dstorage state line, with staging bytes and each lane's unsubmitted/held/reads/statuses/running and capacity — victory-hle/src/modules/dstorage.rs:581.
  • VICTORY_FRAME_DUMP=<seconds>,<file.ppm>: the last presented frame saved once, with the frame count and the refused shader work — apps/victory/src/native_run.rs:357.
  • VICTORY_DUMP_WRITERS=<substr>,...: needs VICTORY_DUMP_TARGETS set, since it works through the same capture; a written buffer's first 64 MiB read when first bound, reported at the present by dwords changed and not zero — victory-gpu/src/capture.rs:236, :291.
  • VICTORY_PIPELINE_LOG=<file> (diagnostics build): creates the file and writes one 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, and each list's wall time against the sum of its commands', plus the commands of a list during which the device was found removed — victory-gpu/src/host.rs:336, :3684.

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

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

How it was tested

  • cargo xtask policy: 398 files ok.
  • Every claim traced to the lines above; nothing written from a switch's name.
  • Game run: not needed (docs).
**@⁠AnastasisKon** on GitHub · 2026-11-27 22:06 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485) ## What `docs/native-host.md`'s "Bring-up diagnostics" list is missing switches the code reads today, so a tester reading the docs cannot find them and someone changing them cannot see who depends on them. Six were undocumented: `VICTORY_DSTORAGE_LOG`, `VICTORY_FRAME_DUMP`, `VICTORY_DUMP_WRITERS`, `VICTORY_PIPELINE_LOG`, `VICTORY_TRACE_SHADERS`, `VICTORY_GPU_TIMING`. `docs/macos.md` also says `VICTORY_STACKS_FILE` needs a build with `VICTORY_DIAGNOSTICS=1`, which is not true any more: `stacks.rs` reads it in any build. ## What the entries say, and where each was checked - `VICTORY_DSTORAGE_LOG` (any build): the 3 s `dstorage state` line, with staging bytes and each lane's unsubmitted/held/reads/statuses/running and capacity — `victory-hle/src/modules/dstorage.rs:581`. - `VICTORY_FRAME_DUMP=<seconds>,<file.ppm>`: the last presented frame saved once, with the frame count and the refused shader work — `apps/victory/src/native_run.rs:357`. - `VICTORY_DUMP_WRITERS=<substr>,...`: needs `VICTORY_DUMP_TARGETS` set, since it works through the same capture; a written buffer's first 64 MiB read when first bound, reported at the present by dwords changed and not zero — `victory-gpu/src/capture.rs:236`, `:291`. - `VICTORY_PIPELINE_LOG=<file>` (diagnostics build): creates the file and writes one 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, and each list's wall time against the sum of its commands', plus the commands of a list during which the device was found removed — `victory-gpu/src/host.rs:336`, `:3684`. `VICTORY_DUMP_REGISTRY` was already documented, and correctly (the subsystem registry at the first title `int3`), so it is not repeated here. Docs only: no code, no behaviour change, no new switches. ## How it was tested - `cargo xtask policy`: 398 files ok. - Every claim traced to the lines above; nothing written from a switch's name. - Game run: not needed (docs).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 22:11:24 +00:00
Author
Owner

@⁠AnastasisKon on GitHub · 2026-11-27 22:06 UTC · original

/claim

**@⁠AnastasisKon** on GitHub · 2026-11-27 22:06 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7229037783) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 22:06 UTC · original

Claimed by @⁠AnastasisKon. Open a draft pull request with Refs #485 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 22:06 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7229040414) Claimed by @⁠AnastasisKon. Open a draft pull request with `Refs #485` in its description within 24 hours, or the claim expires.
Author
Owner

@⁠AnastasisKon on GitHub · 2026-11-28 12:45 UTC · original

/release - done, and the last gap closed today. Most of the switches now sit in docs/native-host.md in my fork's main (via vibe/doc-diagnostic-switches-4f9c68). The two that were still missing, VICTORY_STACKS and VICTORY_STACKS_FILE, turned out to be read only by diagnostics() in apps/victory/src/run.rs, which is cfg(all(windows, feature = "diagnostics")), so the native host never reads them: I listed them in the #586 inventory line as Windows-only rather than as native bullets (my fork's main, d23b5e31). Note the older vibe/document-diagnostic-switches-567a86 branch carried a full bullet for them but is based on a much older tree and would have reverted newer doc text, so I did not merge it.

**@⁠AnastasisKon** on GitHub · 2026-11-28 12:45 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7239444287) /release - done, and the last gap closed today. Most of the switches now sit in `docs/native-host.md` in my fork's `main` (via `vibe/doc-diagnostic-switches-4f9c68`). The two that were still missing, `VICTORY_STACKS` and `VICTORY_STACKS_FILE`, turned out to be read only by `diagnostics()` in `apps/victory/src/run.rs`, which is `cfg(all(windows, feature = "diagnostics"))`, so the native host never reads them: I listed them in the #586 inventory line as Windows-only rather than as native bullets (my fork's `main`, d23b5e31). Note the older `vibe/document-diagnostic-switches-567a86` branch carried a full bullet for them but is based on a much older tree and would have reverted newer doc text, so I did not merge it.
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-28 12:45 UTC · original

Released. This issue is free to claim.

**@⁠github-actions[bot]** on GitHub · 2026-11-28 12:45 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7239446003) Released. This issue is free to claim.
This discussion has been locked. Commenting is limited to contributors.
No description provided.