fix(sandbox): the game can load DLSS's runtime from its own ngx folder #3061
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3061
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/sandbox-dlss-runtime"
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
With the sandbox on (the default since #2822), DLSS can't be used with the runtime the build places: it is in the game folder's
ngx/, but the sandbox only lets libraries read the user-widengxfolder (~/.local/share/longshot/ngx,%LOCALAPPDATA%\Longshot\ngx). NGX opens the runtime itself, so it is refused, and the log wrongly saysDLSS needs an NVIDIA RTX GPU(0xbad00004).Seen on an RTX 3090 (driver 620.70.06) with
nightly-1007-d984fd70. The cause comes from reading the code; it is not yet confirmed by a run.sandbox_linux::gathernow adds the game folder'sngx/tolib_read: read only, and only when it is a real folder, not a link. The game cannot write there: the game folder is served read-only andngx/is not among the written subfolders.Windows has the same gap and gets the same fix (
sandbox_windows/plan.rs,gather.rs), found by reading the code only: no Windows report or log confirms it. Please review this part closely: it is an exception to "no ACL at, above or under the game folder" beyond the program's own files. It is<game>\ngxalone, read only, added when the folder exists, and dropped by the existing recheck when it is a junction or link.Testing
Tested: nothing yet. The change has not been compiled, tested or run in the game; only
rustfmtran. The new tests (one insandbox_linux, one insandbox_windows::plan) and a Windows-target compile check are waiting in the job queue.Still to test:
main;mise run test-changed(by hand)RX_VK_DLSS=1 RX_VK_DLSS_LOG=1and the sandbox on, expectingNGX started, and0xbad00004onmain(by hand)ngx, expectingNGX startedhere and not onmain. NGX also writes its own logs into that folder, which stays read only: check that it starts anyway (by hand)Measurements
Nothing to measure yet: this restores a feature and changes no rendering code.
Risks
Libraries in the game process can now read and map files in the game folder's
ngx/. Only the build writes there. On Windows the grant is inherited by the files in it, so a runtime hard-linked from the builder's store gets the read grant on that file too. Reverting is enough; nothing about saves, settings or caches changes.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (not run yet)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (written, not run yet)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
WIP: fix(sandbox): the game can load DLSS's runtime from its own ngx folderto fix(sandbox): the game can load DLSS's runtime from its own ngx folder