VICTORY_HOST_WAVE and VICTORY_HOST_MAX_WAVE are the same setting, and translate --warm honours only one of them #27

Closed
opened 2026-11-26 03:31:26 +00:00 by github-bot · 0 comments
Owner

@⁠itsonewi on GitHub · 2026-11-25 23:49 UTC · original

Two environment names set the same translation setting, and the one the --warm help tells you to use is not the one the code comment names.

  • apps/victory/src/main.rs:207-210 (only inside the Translate arm):
// `VICTORY_HOST_WAVE=32`: translate as for a GPU whose waves are at most 32 lanes
if let Some(n) = std::env::var("VICTORY_HOST_WAVE").ok().and_then(|v| v.parse().ok()) {
    victory_shader::emit::set_host_max_wave(n);
}
  • apps/victory/src/translate.rs:248-251:
// `VICTORY_HOST_MAX_WAVE=32`: translate as for a host whose waves ...
if let Some(n) = std::env::var("VICTORY_HOST_MAX_WAVE").ok().and_then(|v| v.parse().ok()) {
    victory_shader::emit::set_host_max_wave(n);
}

The --warm help text (main.rs:91-97) says "Set VICTORY_HOST_WAVE and VICTORY_VIEW_LIMIT to what the run's log says of the host", the code comment one screen below says VICTORY_HOST_MAX_WAVE, and a search of the repository finds each name in exactly one file. Consequences worth fixing:

  • victory translate --warm <file> honours only VICTORY_HOST_WAVE (the main.rs block runs before the warm early return at translate.rs line ~212 is reached; translate::warm never reads the other name). Someone following the comment — which is the only place the full rule is explained — gets their value ignored there.
  • On a full victory translate both are read, and VICTORY_HOST_MAX_WAVE wins because it is applied second, so the two names silently disagree when both are set.

One name, read in one place (translate::run, or better in main.rs for the whole Translate command including --warm), and a warning when the other spelling is set, would remove the ambiguity. VICTORY_HOST_WAVE is the one in the help text and in docs/, so that is the spelling I would keep.

Same shape, smaller: VICTORY_HOST_RDNA at translate.rs:253-254 is the only switch of the three that has no runtime equivalent (host.rs decides RDNA by adapter), which is fine, but it is worth a line in the same help text.

Not checked

Source reading at 0a43566; I did not run either command. Which of the two names the --warm path takes is read from the call order in main.rs, not observed.

AI use

AI-assisted review (source reading). No build, no run, no game files.

**@⁠itsonewi** on GitHub · 2026-11-25 23:49 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/27) Two environment names set the same translation setting, and the one the `--warm` help tells you to use is not the one the code comment names. - `apps/victory/src/main.rs:207-210` (only inside the `Translate` arm): ```rust // `VICTORY_HOST_WAVE=32`: translate as for a GPU whose waves are at most 32 lanes if let Some(n) = std::env::var("VICTORY_HOST_WAVE").ok().and_then(|v| v.parse().ok()) { victory_shader::emit::set_host_max_wave(n); } ``` - `apps/victory/src/translate.rs:248-251`: ```rust // `VICTORY_HOST_MAX_WAVE=32`: translate as for a host whose waves ... if let Some(n) = std::env::var("VICTORY_HOST_MAX_WAVE").ok().and_then(|v| v.parse().ok()) { victory_shader::emit::set_host_max_wave(n); } ``` The `--warm` help text (`main.rs:91-97`) says "Set `VICTORY_HOST_WAVE` and `VICTORY_VIEW_LIMIT` to what the run's log says of the host", the code comment one screen below says `VICTORY_HOST_MAX_WAVE`, and a search of the repository finds each name in exactly one file. Consequences worth fixing: - `victory translate --warm <file>` honours only `VICTORY_HOST_WAVE` (the `main.rs` block runs before the `warm` early return at `translate.rs` line ~212 is reached; `translate::warm` never reads the other name). Someone following the comment — which is the only place the full rule is explained — gets their value ignored there. - On a full `victory translate` both are read, and `VICTORY_HOST_MAX_WAVE` wins because it is applied second, so the two names silently disagree when both are set. One name, read in one place (`translate::run`, or better in `main.rs` for the whole `Translate` command including `--warm`), and a warning when the other spelling is set, would remove the ambiguity. `VICTORY_HOST_WAVE` is the one in the help text and in `docs/`, so that is the spelling I would keep. Same shape, smaller: `VICTORY_HOST_RDNA` at `translate.rs:253-254` is the only switch of the three that has no runtime equivalent (`host.rs` decides RDNA by adapter), which is fine, but it is worth a line in the same help text. ## Not checked Source reading at `0a43566`; I did not run either command. Which of the two names the `--warm` path takes is read from the call order in `main.rs`, not observed. ## AI use AI-assisted review (source reading). No build, no run, no game files.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:26 +00:00
github-bot 2026-11-26 08:24:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/avatarmanz--VIctory-7900XTX#27
No description provided.