Skip to content

menu: the DLSS note comes from the menu's own state, not from this PC's environment - #1

Open
erdemcisse wants to merge 1 commit into
RedLightDOWN:mainfrom
erdemcisse:fix/menu-note-not-from-the-environment
Open

erdemcisse wants to merge 1 commit into
RedLightDOWN:mainfrom
erdemcisse:fix/menu-note-not-from-the-environment

Conversation

@erdemcisse

Copy link
Copy Markdown

What and why

Menu::lines asked VICTORY_STREAMLINE_DIR again for every painted line, so what the F1 menu said depended on the environment of whoever ran it. On a machine that sets that variable — a developer's own Streamline SDK, as Get-NVIDIA-DLSS.cmd sets up — the test victory-gpu's host::menu::tests::the_link_is_always_right_under_the_note fails with three empty lines where the note belongs:

thread '…the_link_is_always_right_under_the_note' panicked at crates\victory-gpu\src\host\menu.rs:1123:
assertion `left == right` failed
  left: ["", "", ""]
 right: ["THE NVIDIA DLSS FILES ARE NOT ON THIS PC YET: THEY ARE", …]

CI passes only because its runner has no such variable, so the test proves nothing on the machines the fork is developed on.

The note is a property of the menu, decided when it opens, not a fact re-read each frame: resolve it once in Menu::new() into no_dlss_files and let the line read the field. The tests then say which state they test (no_dlss_files: true in the one that checks the note, false elsewhere) instead of inheriting one. No environment lookup stays on the paint path.

Tested

Windows 11 (10.0.26100), the Rust 1.98.1 toolchain pinned in rust-toolchain.toml, target x86_64-pc-windows-gnu (this PC has no MSVC toolchain, so the linker is mingw-w64's gcc — same sources, same lints; CI's windows-latest MSVC run is the authority).

tree VICTORY_STREAMLINE_DIR the_link_is_always_right_under_the_note
main (17303ca) set (C:\Users\…\victory\nvidia-sdk\Streamline\bin\x64) FAILED — left: ["", "", ""]
main unset ok
this branch set ok
this branch unset ok

With the branch, all seven host::menu tests pass (cargo test -p victory-gpu --lib host::menu::), and the whole victory-gpu --lib suite is 456 passed / 36 ignored with the variable set, apart from descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync, which failed once in a full run and passed when run alone — it looks flaky and is not touched here; I did not chase it.

Not fixed here, and worth its own change: CI on main has never been green — the Clippy step dies in victory-shader before the tests run (manual implementation of .is_multiple_of() at crates/victory-shader/src/emit/water_tile_slots.rs:80, and returning the result of a let binding from a block in the div_fixup_corner_fixture test of crates/victory-shader/src/emit/mod.rs). With those two taken out of the way on a scratch branch, about 30 more -D warnings failures in victory-gpu appear (dead_code, needless_borrow, needless_mut, more is_multiple_of), so the lint cleanup is a separate, larger change.

GPUs tested: n/a — a menu unit test; no GPU workload, no game files.

AI-assisted: yes — DeepSeek Harness (lead agent).

…'s environment

`Menu::lines` asked `VICTORY_STREAMLINE_DIR` again for every painted line, so
what the menu said depended on the environment of whoever ran it: on a machine
that sets that variable (a developer's own Streamline SDK), the doc test
`the_link_is_always_right_under_the_note` failed with three empty lines where
the note belongs, and CI only passed because its runner has no such variable.

Resolve it once, when the menu opens, into `no_dlss_files`, and let the line
read that. The tests say which state they test instead of inheriting one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant