Repository navigation
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
Open
erdemcisse wants to merge 1 commit into
erdemcisse wants to merge 1 commit into
Conversation
…'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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Menu::linesaskedVICTORY_STREAMLINE_DIRagain 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, asGet-NVIDIA-DLSS.cmdsets up — the testvictory-gpu'shost::menu::tests::the_link_is_always_right_under_the_notefails with three empty lines where the note belongs: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()intono_dlss_filesand let the line read the field. The tests then say which state they test (no_dlss_files: truein the one that checks the note,falseelsewhere) 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, targetx86_64-pc-windows-gnu(this PC has no MSVC toolchain, so the linker is mingw-w64's gcc — same sources, same lints; CI'swindows-latestMSVC run is the authority).VICTORY_STREAMLINE_DIRthe_link_is_always_right_under_the_notemain(17303ca)C:\Users\…\victory\nvidia-sdk\Streamline\bin\x64)left: ["", "", ""]mainWith the branch, all seven
host::menutests pass (cargo test -p victory-gpu --lib host::menu::), and the wholevictory-gpu --libsuite is 456 passed / 36 ignored with the variable set, apart fromdescriptor::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
mainhas never been green — theClippystep dies invictory-shaderbefore the tests run (manual implementation of .is_multiple_of()atcrates/victory-shader/src/emit/water_tile_slots.rs:80, andreturning the result of a let binding from a blockin thediv_fixup_corner_fixturetest ofcrates/victory-shader/src/emit/mod.rs). With those two taken out of the way on a scratch branch, about 30 more-D warningsfailures invictory-gpuappear (dead_code,needless_borrow,needless_mut, moreis_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).