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

Open
opened 2026-11-27 22:06:44 +00:00 by AnastasisKon · 4 comments
AnastasisKon commented 2026-11-27 22:06:44 +00:00 (Migrated from github.com)
Contributor

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


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).
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6655208468 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T22:06:44Z. --- ## 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 commented 2026-11-27 22:06:45 +00:00 (Migrated from github.com)
Author
Contributor

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


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229037783 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7229037783). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T22:06:45Z. --- /claim
github-actions[bot] commented 2026-11-27 22:06:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T22:06:56Z.


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

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229040414 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7229040414). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T22:06:56Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #485` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-28 12:45:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:45:22Z.


/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 #582 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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7239444287 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7239444287). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T12:45:22Z. --- /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 #582 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.
github-actions[bot] commented 2026-11-28 12:45:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T12:45:31Z.


Released. This issue is free to claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7239446003 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/485#issuecomment-7239446003). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T12:45:31Z. --- Released. This issue is free to claim.
Sign in to join this conversation.
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#485
No description provided.