fix(dlss): DLSS 5's rows show: the sandboxed game finds the player's file, and the menu reads late capabilities #3102
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3102
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/dlss5-rows"
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?
Summary
A player added the DLSS 5 file in the Launcher and saw no DLSS 5 setting in the game. Reading the code and their screenshots turned up two bugs that each hide the rows. Which of them they hit hasn't been confirmed on their PC.
1. The confined Windows game looks in the wrong folder. Inside its AppContainer, Windows gives the game another
LOCALAPPDATA(...\Packages\longshot.game\AC; a player's log shows the driver's cache path under it). So%LOCALAPPDATA%\Longshot\ngx, where the Launcher puts the DLSS 5 file and where the builder already grants read access, was never searched. The builder now names the real folder to the game (LONGSHOT_SANDBOX_NGX), and NGX's and Streamline's folder lists take it.2. The menu doesn't read its rows again when a later capability arrives.
generation_ofcut the renderer's generation to its low 53 bits, and the capabilities from bit 13 up (antiLagtosimTurf, DLSS 5's among them) sit above them. It now hashes the parts together before the cut. DLSS 5's can arrive late because its file is checked in the background.Also adds the missing
switches.defrow for #3086'sLONGSHOT_SANDBOX_PROGRAMDATA, whichtest_switch_table.pyfailed on.Read first:
runtime_dirsingpu/vk/vk_dlss.cpp,NGX_ENVinsandbox_windows.rs,generation_ofinsettings_host.rs.Testing
Tested: Linux, game-free only. Not run in the game, and nothing has run on Windows.
tests/test_sandbox_dlss_user_folder.py(new, g++ and clang++): fails without the fix, passes with it.every_capability_moves_the_generation_on(new): fails without the fix, passes with it.cargo test -p build-core, clippy for Linux andx86_64-pc-windows-gnullvm: pass.cargo test -p api(518) and clippy: pass. All run again on the rebased head, withcargo fmt --check.test_switch_table.py,test_doc_anchors.pypass.vk_dlss.cppandvk_dlssg.cpp: llvm-mingw-fsyntax-onlywithLONGSHOT_NGX(andLONGSHOT_SL), against the Linux NGX SDK's headers: no errors.Still to test:
%LOCALAPPDATA%\Longshot\ngx: expectDLSS 5: ... foundin the game's log and the rows under Sharpness (by hand, the reporter)Measurements
Nothing to measure: where files are looked for, and when the menu reads its rows again. The generation's hash replaces a multiply in a per-frame path.
Risks
%LOCALAPPDATA%\Longshot\ngx, as an unconfined game already does. NGX takes the newest it finds.Checklist
Ready for review
main; the title is a Conventional Commit. (Two causes of one symptom)--forceon request)mise run testpasses (any failure that also fails onmainis named). (Only the checks above ran)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.gpu/vk/switches.def.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Possibly related, for context:
@review
Recommendation: Approve. The new checks have portability and shared-state problems. The reported in-game fix also remains unverified on Windows and other affected systems. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The change passes the player’s DLSS folder to a confined Windows game and makes menu generations reflect late renderer capabilities. It addresses two plausible causes of missing rows, at the cost of a new environment handoff and hash calculation.
Should fix (2): not blocking, but worth doing before merging.
tests/test_sandbox_dlss_user_folder.py:60: The test hard-codes g++ and does not declare the runner’s C++ compiler argument. (more on the line) Do: Declare RUN_ALL_ARGS with {cxx}, honor the selected compiler, and give the stand-in a distinct name or otherwise avoid redeclaring the CRT function.game/crates/api/src/services/settings_host.rs:1836: The new mutex does not serialize all tests that change the process-wide fake renderer. (more on the line) Do: Use one shared test lock for every test that changes or relies on the fake renderer, or isolate the fake state per test.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_dlss.cpp:774: The confined Windows path has not been exercised in the game. (more on the line) Do: Run the described Windows NVIDIA cases with the file only in the player’s folder, including a portable launcher and a no-file regression case; record the logs and menu result.game/crates/api/src/services/settings_host.rs:179: The shared menu-generation change has not been checked in the game on the systems it affects. (more on the line) Do: Check capability-dependent menu rows and refresh behavior on affected Tier 1 Windows and Linux systems, including AMD and Steam Deck, and record the results.@fixcan do L1 and L2.Questions (1) (not confirmed from the code; they don't hold the recommendation)
builder/crates/build-core/src/sandbox_windows.rs:1638: Is there a known case where the builder-to-game handoff fails with this assignment present?Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The author reports game-free tests passing on Linux and failing without the fixes, but the reporter’s cause is unknown and no Windows game run has confirmed that the file is found or the rows appear.
Other systems: The folder change affects Windows NGX and Streamline, including DLSS and frame generation. The generation change affects capability-dependent menu rows on Windows and Linux across GPU vendors. No game runs on those paths are reported.
Switches: LONGSHOT_SANDBOX_NGX is added as a builder-supplied path; when unset, the renderer uses LOCALAPPDATA/Longshot/ngx. LONGSHOT_SANDBOX_PROGRAMDATA gains a table row but its behavior is unchanged. The new handoff’s confined Windows behavior still needs a game run.
Reviewed:
b67b59ef9cagainst313178e5da: Read the rules, PR description, commits and complete diff; inspected the changed functions and their callers, sandbox planning, renderer capability generation and test runner. The large changed source and reference files were read only in part because their combined output was truncated; switches.def and sandbox documentation were skimmed. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run, as requested. The author reports Linux game-free checks and pre-rebase Rust checks; CI is still running.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -178,0 +176,4 @@// (hashed together, then cut to a whole number JavaScript holds exactly, below 2^53: the cut alone would drop a// change in the high bits, where the renderer's generation holds the later capabilities, DLSS 5's among them)let mut all = std::collections::hash_map::DefaultHasher::new();(caps, h, lang).hash(&mut all);L4 (should fix): The shared menu-generation change has not been checked in the game on the systems it affects.
When: Capability-dependent rows on Linux and on non-NVIDIA hardware also use this generation, but the reported runs only exercise the fake renderer.
Do: Check capability-dependent menu rows and refresh behavior on affected Tier 1 Windows and Linux systems, including AMD and Steam Deck, and record the results.
@ -1826,0 +1833,4 @@#[test]fn every_capability_moves_the_generation_on() {use host_sys::settings_link::{CAP_NAMES, LsCapabilities, fake_set};let _one = FAKE_RENDERER.lock().unwrap_or_else(std::sync::PoisonError::into_inner);L2 (should fix): The new mutex does not serialize all tests that change the process-wide fake renderer.
When: The i18n language test can call fake_set concurrently with the new capability test, clearing its capabilities between setting and reading them; either test can then fail depending on scheduling.
Do: Use one shared test lock for every test that changes or relies on the fake renderer, or isolate the fake state per test.
@ -772,1 +772,3 @@if (fs::path l = env_path(L"LOCALAPPDATA"); !l.empty()) dirs.push_back(l / L"Longshot" / L"ngx");// (confined, Windows gives the game another LOCALAPPDATA, the container's: the builder names the player's own folder,// which it grants, in LONGSHOT_SANDBOX_NGX)if (fs::path n = env_path(L"LONGSHOT_SANDBOX_NGX"); !n.empty()) dirs.push_back(n);L3 (should fix): The confined Windows path has not been exercised in the game.
When: The game-free stand-ins cannot show whether AppContainer permissions and NGX or Streamline actually allow the player’s runtime to be found and loaded.
Do: Run the described Windows NVIDIA cases with the file only in the player’s folder, including a portable launcher and a no-file regression case; record the logs and menu result.
@ -0,0 +57,4 @@def main():ap = argparse.ArgumentParser()ap.add_argument("--cxx", default="g++")L1 (should fix): The test hard-codes g++ and does not declare the runner’s C++ compiler argument. Its stand-in also defines _wgetenv with a name declared by the Windows CRT.
When: A supported Windows or Linux test environment with only the configured clang++ has no g++ to invoke; on Windows, the stand-in can also conflict with the CRT declaration. The game-free suite cannot run this check reliably on the supported toolchains.
Do: Declare RUN_ALL_ARGS with {cxx}, honor the selected compiler, and give the stand-in a distinct name or otherwise avoid redeclaring the CRT function.
@fix
b67b59ef9c5162329912Recommendation: Approve. The code is ready: only testing is left. The test fixes address both code items, but the DLSS folder lookup and shared menu-generation change still need the in-game runs requested in the ledger. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
5162329912. I rebased it ontomain(471aff1bf9).Changed
Nothing was built or run: the checks run again on the new head.
The change lets a confined Windows game find the player’s DLSS files and makes the menu notice late capability changes. The code changes are small, but their player-facing behavior has not yet been demonstrated in the game.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_dlss.cpp:774: The confined Windows path has not been exercised in the game. When: The game-free stand-ins cannot show whether AppContainer permissions and NGX or Streamline actually allow the player’s runtime to be found and loaded. Do: Run the described Windows NVIDIA cases with the file only in the player’s folder, including a portable launcher and a no-file regression case; record the logs and menu result.game/crates/api/src/services/settings_host.rs:179: The shared menu-generation change has not been checked in the game on the systems it affects. When: Capability-dependent rows on Linux and on non-NVIDIA hardware also use this generation, but the reported runs only exercise the fake renderer. Do: Check capability-dependent menu rows and refresh behavior on affected Tier 1 Windows and Linux systems, including AMD and Steam Deck, and record the results.Checks: they run again on this head; a failure shows on the pull request.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the description reports game-free tests that passed before or after the rebase, but no Windows game run or in-game check of the menu change. This is a correctness fix, not a claimed performance gain.
Other systems: The folder lookup affects confined Windows launches and the NGX and Streamline paths; portable launches and existing DLSS and Frame Generation behavior need checking. The generation change affects menu declarations across platforms and GPUs, including Linux and Steam Deck; no in-game results are reported.
Switches: LONGSHOT_SANDBOX_NGX is added, unset by default and set by the builder for a confined Windows game; otherwise lookup falls back to LOCALAPPDATA. LONGSHOT_SANDBOX_PROGRAMDATA gains a table entry for an existing variable, unset by default. The defaults appear appropriate, pending the Windows run.
Reviewed:
5162329912against471aff1bf9: Read the fix diff, the affected test sections, fake renderer state and reset implementation, the feature diff, repository guidance and pull request template. The larger changed source files and their callers were inspected around the changes rather than read in full; the developer standards were not fully reviewed.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The description reports game-free tests and syntax checks; CI has not run on this head.
Overlaps and merge order: Not checked; network access is unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
WIP: fix(dlss): DLSS 5's rows show: the sandboxed game finds the player's file, and the menu reads late capabilitiesto fix(dlss): DLSS 5's rows show: the sandboxed game finds the player's file, and the menu reads late capabilitiesHumanBean referenced this pull request2026-12-03 20:13:20 +00:00
llun referenced this pull request2026-12-03 20:16:18 +00:00