app: one name for the wave-size override, read in one place #120
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/120"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Zettrox/ztrx. Originally posted by xiaotu030202 on 2026-11-25T12:52:35Z.
What this fixes
VICTORY_HOST_MAX_WAVEtranslates as for a host whose waves have at most that many lanes — the switch that makes an NVIDIA card's refused wave-64 compute programs visible without running the game, as #37 documents in detail. It was read in two places, under two names:Both ran before any translation, so setting either worked, and setting both let the second overwrite the first. Neither was in the README, so which name to use was only discoverable by reading the source — and the documented one was not the one the command's own pre-pass looked at.
Now there is one name, read where the translation happens.
main.rsno longer does it at all, and the comment there says why, so the second spelling does not come back.Also
translate.rsgainedhost_max_wave_from_env, and the value handling is tested now. Before,"lots".parse().ok()would silently fall through and"0"would have been accepted — a wave of zero lanes, which is not a wave:0reachingset_host_max_wavewould have made every wave-64 program look narrowable to 32 lanes, which is worse than the typo it comes from.README — the switch and
VICTORY_WAVE_WHYare now in the debugging table. #37 tells people to use both and the table listed neither.Verification
Windows 11, RTX 5070 Ti, Rust 1.98.1 (pinned), MSVC 14.44.35207. No game files.
I did not re-run
--workspaceto completion for this one: the change is three files in the CLI crate, nothing compiled by the shader or GPU crates is touched, andcargo test -p victorycovers it. The earlier workspace runs in this session were 0 failures.Not changed
victory rundoes not read the override, and should not: the wave size there comes from the host GPU's ownWaveLaneCountMax(host::create), which is the real value. The override exists forvictory translate, where no device is created and the card's answer has to be stated.If #37's author would rather the name were
VICTORY_HOST_WAVE(shorter, and whatmain.rshad), say so and I will flip it — but one of the two had to go, and this kept the one that was written down.Added: the other two switches the issues point at
VICTORY_TRANSLATE_ONLYandVICTORY_VIEW_LIMITwere not in the README either, and both are switches issue reports tell people to use. They are in the table now, and both value parsers are tested — neither was:0used to reachset_host_max_wave(0), where a wave of no lanes reads as every wave-64 program being narrowable to 32 — worse than the typo it comes from, and silent.The trailing-comma case matters: an empty prefix matches every hash and translates the whole pack while looking like a filter.
Of 138
VICTORY_*names, 125 are undocumentedMost are experiment switches for one code path and listing them all would make the table useless. These three were chosen because issue reports already tell people to use them. If a wider set is worth writing down, that is a judgement about which experiments outlived their experiment.
Added: the memory and texture switches the log points at
shadow.rsbuilds its per-frame hint from the variable it actually reads:The message is right, and it is the only place the name appears. #143 read it, set
VICTORY_CARD_BUFFERS_MIN=1— without the_MB— and reported that it made no difference. It could not have.Four switches are in the table now:
VICTORY_CARD_BUFFERS_MIN_MB(16)1sends everything ≥ 1 MiB to the cardVICTORY_CARD_BUFFERS_MB(512)VICTORY_TEXTURE_BUDGET_MBVICTORY_TEXTURE_GUARD=0The first row says in as many words that
VICTORY_CARD_BUFFERS_MINis not a variable this build reads, because that is exactly the mistake a reader of that log line makes. Documenting the right name without naming the wrong one would leave the same trap.cargo xtask policyis 172 files ok — the asset policy coversREADME.mdtoo, so this is checked rather than assumed.Where this sits
Same PR as the
VICTORY_HOST_MAX_WAVEfix, because both are the same failure mode: a switch people are told to use by a log line, that the README does not list. The wave one had two spellings in the code; this one had none in the documentation. Splitting them into two PRs would separate two halves of one problem.Still not documenting all of them: 125 of 138
VICTORY_*names in the tree are absent from the README, and most are single-path experiment switches. The four here were chosen because a log line or an issue report points a user at them.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.