fix(builder): --fetch-ngx-sdk works through --cli without LONGSHOT_NGX_SDK #465

Merged
HumanBean merged 3 commits from Xarishark/Longshot:ngx-sdk-default-folder into main 2026-11-14 17:05:20 +00:00
Contributor

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 drops LONGSHOT_NGX_SDK, so --fetch-ngx-sdk fails with "needs LONGSHOT_NGX_SDK" and a launcher can't ask for a build with DLSS.

What changed

  • build: ngx_folder() in nx2/make_game.py returns LONGSHOT_NGX_SDK, else work/ngx-sdk (the same pattern as ffx_folder()). fetch_ngx_sdk() uses it and sets the variable, so the rest of the build and place_ngx_runtime() find the SDK and put both runtimes in ngx.
  • tests: the "needs the SDK folder" test in tests/test_make_game_ngx.py is now "without the variable the SDK goes to work/ngx-sdk".
  • docs: one line in the README's command line paragraph.
  • manifest: recomplauncher.json gets a prepare.options entry, "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-sdk still 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 @ f8042ba8
Hardware: 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.py run on each commit (this PR's test file on main), 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 run
How to reproduce: python -I tests/test_make_game_ngx.py on main with this PR's test file, then on this PR

main @ 9c9d69ed this PR @ f8042ba8
test_without_the_variable_the_sdk_goes_to_work_ngx_sdk FAIL: the fetch stops (exit 1) with no LONGSHOT_NGX_SDK ok: fetches into work/ngx-sdk
tests/test_make_game_ngx.py FAILED (failures=1), 13 tests OK, 13 tests
tests/run_all.py 484 passed, 3 failed 484 passed, 3 failed
main @ 9c9d69ed:  - ([], 1)   + ([('/tmp/ls-main/work/ngx-sdk', 'linux')], 0)   FAILED (failures=1)
this PR @ f8042ba8:  Ran 13 tests ... OK

The 3 run_all.py failures are the same on main and 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.py passes (13 tests) on Linux. python -I -B tests/run_all.py after the rebase: 484 passed, 3 failed (test_lift_cache, test_bake_portability, test_walk_key), and the same 3 fail on main.

Tested in the game (Windows 11, RTX 5080): the release builder nightly-133-55e5599c, from its zip, with this PR's make_game.py in place, and no LONGSHOT_NGX_SDK set.

  • Before (the release builder as it is): --cli --prepare --fetch-ngx-sdk --accept-nvidia-license stops at once with error --fetch-ngx-sdk needs LONGSHOT_NGX_SDK, the folder NVIDIA's DLSS SDK goes into.
  • With this PR: the SDK downloads into work/ngx-sdk, the log says the Vulkan back end: with NVIDIA DLSS, the build finishes with no error, and ngx holds nvngx_dlss.dll (59 MB) and nvngx_dlssg.dll (7.5 MB).
  • longshot_log.txt with RX_VK_DLSS_LOG=1: vk: NVIDIA DLSS: NGX started (DLSS's runtime: the newest nvngx_dlss.dll in <game folder>\ngx, ...).
  • The Graphics page's Upscaler row offers NVIDIA DLSS, with a DLSS model row (screenshot in the comment).

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:

  • Linux with an RTX card: build with --cli --prepare --fetch-ngx-sdk --accept-nvidia-license and no LONGSHOT_NGX_SDK, expecting ngx to hold libnvidia-ngx-dlss.so.<version> and libnvidia-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-sdk change. Reverting the commit is enough.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main (9c9d69ed).
  • python -I -B tests/run_all.py run and passing (the 3 failures named under Measurements also fail on main).
  • Tested in the game, or what wasn't is named under Testing.
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (A game-free test, no timing: main, this PR, main, this PR gave FAILED, OK, FAILED, OK.)
  • Testing filled in: what was tested, what wasn't, and what needs other testers.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened (the old "needs the SDK folder" test became "goes to work/ngx-sdk").
  • Docs updated.
## 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 drops `LONGSHOT_NGX_SDK`, so `--fetch-ngx-sdk` fails with "needs LONGSHOT_NGX_SDK" and a launcher can't ask for a build with DLSS. ## What changed - build: `ngx_folder()` in `nx2/make_game.py` returns `LONGSHOT_NGX_SDK`, else `work/ngx-sdk` (the same pattern as `ffx_folder()`). `fetch_ngx_sdk()` uses it and sets the variable, so the rest of the build and `place_ngx_runtime()` find the SDK and put both runtimes in `ngx`. - tests: the "needs the SDK folder" test in `tests/test_make_game_ngx.py` is now "without the variable the SDK goes to `work/ngx-sdk`". - docs: one line in the README's command line paragraph. - manifest: `recomplauncher.json` gets a `prepare.options` entry, "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-sdk` still 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 @ f8042ba8 Hardware: 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.py` run on each commit (this PR's test file on `main`), 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 run How to reproduce: `python -I tests/test_make_game_ngx.py` on `main` with this PR's test file, then on this PR | | main @ 9c9d69ed | this PR @ f8042ba8 | |---|---|---| | `test_without_the_variable_the_sdk_goes_to_work_ngx_sdk` | FAIL: the fetch stops (exit 1) with no `LONGSHOT_NGX_SDK` | ok: fetches into `work/ngx-sdk` | | `tests/test_make_game_ngx.py` | FAILED (failures=1), 13 tests | OK, 13 tests | | `tests/run_all.py` | 484 passed, 3 failed | 484 passed, 3 failed | ``` main @ 9c9d69ed: - ([], 1) + ([('/tmp/ls-main/work/ngx-sdk', 'linux')], 0) FAILED (failures=1) this PR @ f8042ba8: Ran 13 tests ... OK ``` The 3 `run_all.py` failures are the same on `main` and 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.py` passes (13 tests) on Linux. `python -I -B tests/run_all.py` after the rebase: 484 passed, 3 failed (`test_lift_cache`, `test_bake_portability`, `test_walk_key`), and the same 3 fail on `main`. **Tested in the game (Windows 11, RTX 5080):** the release builder `nightly-133-55e5599c`, from its zip, with this PR's `make_game.py` in place, and no `LONGSHOT_NGX_SDK` set. - Before (the release builder as it is): `--cli --prepare --fetch-ngx-sdk --accept-nvidia-license` stops at once with `error --fetch-ngx-sdk needs LONGSHOT_NGX_SDK, the folder NVIDIA's DLSS SDK goes into.` - With this PR: the SDK downloads into `work/ngx-sdk`, the log says `the Vulkan back end: with NVIDIA DLSS`, the build finishes with no error, and `ngx` holds `nvngx_dlss.dll` (59 MB) and `nvngx_dlssg.dll` (7.5 MB). - `longshot_log.txt` with `RX_VK_DLSS_LOG=1`: `vk: NVIDIA DLSS: NGX started (DLSS's runtime: the newest nvngx_dlss.dll in <game folder>\ngx, ...)`. - The Graphics page's Upscaler row offers NVIDIA DLSS, with a DLSS model row (screenshot in the comment). **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:** - Linux with an RTX card: build with `--cli --prepare --fetch-ngx-sdk --accept-nvidia-license` and no `LONGSHOT_NGX_SDK`, expecting `ngx` to hold `libnvidia-ngx-dlss.so.<version>` and `libnvidia-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-sdk` change. Reverting the commit is enough. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main` (9c9d69ed). - [x] `python -I -B tests/run_all.py` run and passing (the 3 failures named under Measurements also fail on `main`). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (A game-free test, no timing: `main`, this PR, `main`, this PR gave FAILED, OK, FAILED, OK.) - [x] Testing filled in: what was tested, what wasn't, and what needs other testers. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened (the old "needs the SDK folder" test became "goes to `work/ngx-sdk`"). - [x] Docs updated.
docs(readme): where --fetch-ngx-sdk keeps the SDK without LONGSHOT_NGX_SDK
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 1m3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
6f7a492e65
feat(launcher): an NVIDIA DLSS tick in the RecompLauncher setup, for RTX cards
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
8356506087
Author
Contributor

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.

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.
Author
Contributor

Tested in the game on Windows 11, RTX 5080: the release builder nightly-133-55e5599c (from its zip) with this PR's make_game.py in place, no LONGSHOT_NGX_SDK set, and the game copy built from the .nup (v131072).

Before (the release builder as it is):

error --fetch-ngx-sdk needs LONGSHOT_NGX_SDK, the folder NVIDIA's DLSS SDK goes into.

With this PR:

NVIDIA's license accepted: getting NVIDIA's DLSS SDK into ...\tools\work\ngx-sdk
the Vulkan back end: with NVIDIA DLSS (NVIDIA's NGX SDK in ...\tools\work\ngx-sdk)
NVIDIA DLSS: C:\lsb\game\ngx\nvngx_dlss.dll (NVIDIA's, under NVIDIA's license: never share this game folder)
NVIDIA DLSS Frame Generation: C:\lsb\game\ngx\nvngx_dlssg.dll (NVIDIA's too)

The build finished with no error. In the game, longshot_log.txt (with RX_VK_DLSS_LOG=1) has vk: 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:

Graphics page: Upscaler NVIDIA DLSS

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.

Tested in the game on Windows 11, RTX 5080: the release builder `nightly-133-55e5599c` (from its zip) with this PR's `make_game.py` in place, no `LONGSHOT_NGX_SDK` set, and the game copy built from the `.nup` (v131072). Before (the release builder as it is): ``` error --fetch-ngx-sdk needs LONGSHOT_NGX_SDK, the folder NVIDIA's DLSS SDK goes into. ``` With this PR: ``` NVIDIA's license accepted: getting NVIDIA's DLSS SDK into ...\tools\work\ngx-sdk the Vulkan back end: with NVIDIA DLSS (NVIDIA's NGX SDK in ...\tools\work\ngx-sdk) NVIDIA DLSS: C:\lsb\game\ngx\nvngx_dlss.dll (NVIDIA's, under NVIDIA's license: never share this game folder) NVIDIA DLSS Frame Generation: C:\lsb\game\ngx\nvngx_dlssg.dll (NVIDIA's too) ``` The build finished with no error. In the game, `longshot_log.txt` (with `RX_VK_DLSS_LOG=1`) has `vk: 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: ![Graphics page: Upscaler NVIDIA DLSS](https://git.magicbean.dev/attachments/55082e5c-ba79-44f6-b581-3ff7fefbdba4) 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.
Xarishark force-pushed ngx-sdk-default-folder from 8356506087
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to f8042ba8b0
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 3s
2026-11-14 16:48:06 +00:00
Compare
Author
Contributor

Rebased 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.

Rebased 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.
Xarishark changed title from WIP: fix(builder): --fetch-ngx-sdk works through --cli without LONGSHOT_NGX_SDK to fix(builder): --fetch-ngx-sdk works through --cli without LONGSHOT_NGX_SDK 2026-11-14 16:51:36 +00:00
HumanBean deleted branch ngx-sdk-default-folder 2026-11-14 17:05:21 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 3s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!465
No description provided.