fix(builder): --fetch-ngx-sdk works through --cli without LONGSHOT_NGX_SDK #465
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!465
Loading…
Reference in a new issue
No description provided.
Delete branch "Xarishark/Longshot:ngx-sdk-default-folder"
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?
Why
I am a main developer of RecompLauncher, and I want to fix a problem we have with our userbase. RecompLauncher builds Longshot for players with
LongshotBuilder --cli --prepare. Players on NVIDIA RTX cards ask why the in-game menu has no DLSS option, as it does when they use the Longshot Launcher. We can't fix that on our side: the builder dropsLONGSHOT_NGX_SDK, so--fetch-ngx-sdkfails with "needs LONGSHOT_NGX_SDK" and a launcher can't ask for a build with DLSS.What changed
ngx_folder()innx2/make_game.pyreturnsLONGSHOT_NGX_SDK, elsework/ngx-sdk(the same pattern asffx_folder()).fetch_ngx_sdk()uses it and sets the variable, so the rest of the build andplace_ngx_runtime()find the SDK and put both runtimes inngx.tests/test_make_game_ngx.pyis now "without the variable the SDK goes towork/ngx-sdk".recomplauncher.jsongets aprepare.optionsentry, "NVIDIA DLSS and frame generation" (--fetch-ngx-sdk --accept-nvidia-license). RecompLauncher shows it only on Windows or Linux with an RTX card, starts it off and links NVIDIA's license, so ticking it is the player accepting it. Without the builder fix above the flag fails through--cli, which is why both are in this PR.Flags and settings
None new. The RecompLauncher tick is off by default (it needs the player's license acceptance).
--fetch-ngx-sdkstill needs--accept-nvidia-license; a launcher would pass both only after the player agrees to NVIDIA's license.Measurements
main:
9c9d69ed(2026-11-14)this PR: ngx-sdk-default-folder @
f8042ba8Hardware: Linux VM (Python 3.15), the game-free test; and the game build above on Windows 11, RTX 5080
Scene: nothing on screen and nothing in the frame: a build-time flag
Method:
tests/test_make_game_ngx.pyrun on each commit (this PR's test file onmain), 2 interleaved runs each (main, this PR, main, this PR): FAILED, OK, FAILED, OK. It has no timing, so the result is the same on every runHow to reproduce:
python -I tests/test_make_game_ngx.pyonmainwith this PR's test file, then on this PR9c9d69edf8042ba8test_without_the_variable_the_sdk_goes_to_work_ngx_sdkLONGSHOT_NGX_SDKwork/ngx-sdktests/test_make_game_ngx.pytests/run_all.pyThe 3
run_all.pyfailures are the same onmainand here:test_lift_cache,test_bake_portability,test_walk_key(this VM has no vulkan or spirv headers and no game).Testing
Tested:
python -I tests/test_make_game_ngx.pypasses (13 tests) on Linux.python -I -B tests/run_all.pyafter the rebase: 484 passed, 3 failed (test_lift_cache,test_bake_portability,test_walk_key), and the same 3 fail onmain.Tested in the game (Windows 11, RTX 5080): the release builder
nightly-133-55e5599c, from its zip, with this PR'smake_game.pyin place, and noLONGSHOT_NGX_SDKset.--cli --prepare --fetch-ngx-sdk --accept-nvidia-licensestops at once witherror --fetch-ngx-sdk needs LONGSHOT_NGX_SDK, the folder NVIDIA's DLSS SDK goes into.work/ngx-sdk, the log saysthe Vulkan back end: with NVIDIA DLSS, the build finishes with no error, andngxholdsnvngx_dlss.dll(59 MB) andnvngx_dlssg.dll(7.5 MB).longshot_log.txtwithRX_VK_DLSS_LOG=1:vk: NVIDIA DLSS: NGX started (DLSS's runtime: the newest nvngx_dlss.dll in <game folder>\ngx, ...).Not tested: Linux (a build with the SDK there). The RecompLauncher tick itself (Easy Setup showing it, and passing the two flags) was not run; it uses RecompLauncher's existing
prepare.options, which a launcher unit test covers.Needs other testers:
--cli --prepare --fetch-ngx-sdk --accept-nvidia-licenseand noLONGSHOT_NGX_SDK, expectingngxto holdlibnvidia-ngx-dlss.so.<version>andlibnvidia-ngx-dlssg.so.<version>and the Upscaler row to offer NVIDIA DLSS (T-APLS)Screenshots
Nothing on screen
Risk and rollback
Only runs that pass
--fetch-ngx-sdkchange. Reverting the commit is enough.Checklist
For everyone
type(scope): description).main(9c9d69ed).python -I -B tests/run_all.pyrun and passing (the 3 failures named under Measurements also fail onmain).main, this PR,main, this PR gave FAILED, OK, FAILED, OK.)third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened (the old "needs the SDK folder" test became "goes towork/ngx-sdk").Pushed
8356506: recomplauncher.json gets a prepare.options tick for NVIDIA DLSS (RTX cards only, off until the player accepts NVIDIA license). tests/test_recomplauncher_json.py passes. Not built end to end yet.Tested in the game on Windows 11, RTX 5080: the release builder
nightly-133-55e5599c(from its zip) with this PR'smake_game.pyin place, noLONGSHOT_NGX_SDKset, and the game copy built from the.nup(v131072).Before (the release builder as it is):
With this PR:
The build finished with no error. In the game,
longshot_log.txt(withRX_VK_DLSS_LOG=1) hasvk: NVIDIA DLSS: NGX started (DLSS's runtime: the newest nvngx_dlss.dll in C:\lsb\game\ngx, ...), and the Graphics page's Upscaler row offers NVIDIA DLSS, with a DLSS model row:Not tested: Linux, and the RecompLauncher tick itself in Easy Setup. I corrected the checklist: "Rebased on current main" was ticked by mistake, it is unticked now and a rebase is next. The description's Testing section is updated.
8356506087f8042ba8b0Rebased onto main (
9c9d69ed) and force-pushed the branch (f8042ba8): the three commits now carry Assisted-by and Co-Authored-By trailers. The description has the measurements table: the new test fails on main and passes here, and run_all.py gives 484 passed, 3 failed on both (the same 3). The checklist is ticked to match.WIP: fix(builder): --fetch-ngx-sdk works through --cli without LONGSHOT_NGX_SDKto fix(builder): --fetch-ngx-sdk works through --cli without LONGSHOT_NGX_SDK