WIP: feat(builder): NVIDIA Streamline's runtime for an installation that takes it #2749

Closed
Jiro113 wants to merge 6 commits from Jiro113/Longshot:feat/builder-streamline-receipt into main
Contributor

Summary

Stacked on #2748: read its Summary first; this pull request's own commit is the last one.

With #2748 every Windows build with DLSS compiles DLSS Frame Generation through NVIDIA Streamline, but no build puts
Streamline's runtime beside the game, so no player gets it. This puts it there for a player who chose it and accepted
NVIDIA's licenses for it, and for no one else.

  • Who gets it. A Windows build with DLSS of a profile played by an installation that takes Streamline: the
    installation's choice, launcher-instance.json's "streamline": true (beside "upscalers", format 1; missing is
    false), which managed play (play --profile-id) reads; and the profile's receipt, profile.json's
    licenses.streamline at the builder's pin (the 2.14.16 release's commit), which the launcher writes once the player
    accepted NVIDIA's licenses for it. The builder never writes that receipt. The receipt is the consent alone; the choice
    is per installation. Not on Linux (Streamline has no Linux runtime: a Linux installation that says it takes it
    keeps its key), not with a developer's LONGSHOT_SL_SDK.
  • What it gets. The release's zip (276 MB, its SHA-256 checked) is downloaded once, its seven runtime DLLs and the
    three licenses they are under taken out with the system's tar (System32's), each checked against its SHA-256, kept
    in <cache>/runtimes/, and the zip deleted. They go beside longshot.exe, the licenses as
    LICENSE-NVIDIA-STREAMLINE.txt, LICENSE-NVIDIA-DLSS-FG.txt and LICENSE-NVIDIA-REFLEX.txt. Once there, the pinned
    files are kept as they are by every later build, with no cache and no network (offline, or after the cache's prune),
    and noted again as the builder's when the note lost them, so taking Streamline away still takes them out.
    tar is given the zip and the folder by their ASCII names from the cache's folder, whose path may not be ASCII.
  • What the record says. longshot_build.json's streamline: placed; kept (a file of it there is not the
    builder's, another release's: all of it left as it is, nothing downloaded); skipped (it couldn't be had); absent
    when the build was not asked for it. The launcher reads it there to show what is in the game folder. info's
    build.streamline says it too, and the builder's capabilities gain streamline.
  • When it can't be had (offline, a SHA-256 not the pinned one, no tar, a zip that can't be unpacked): one streamline_skipped warning, and the
    build goes on with DLSS as without Streamline. A play of the installation updates the game folder to try again (a new
    RebuildReason::Streamline) when the cache's mark of the last try says it is time
    (<cache>/runtimes/sl-runtime-<pin's first 12>.tried, runtimes::sl_retry_due): 10 minutes after a download that failed, so a
    player with no network is not held up at every play; never at a play after files that are not the pinned ones or a zip
    that can't be unpacked (276 MB each time, and no different: any other build or update, and the next builder, try again). A kept one is not
    tried again, or every play would update.
  • The key. The choice goes in the profile's key like the upscalers, and only when it is wanted (chosen, accepted at
    the pin, DLSS): every other profile keeps the key an earlier builder wrote, so it gets no update (a test pins the
    formula). Choosing it or taking it back is an update of the same game folder.
  • Taking it back. A build not asked for it downloads nothing and takes out the files an earlier build of the
    builder's put there; a file the player or scripts/fetch.py streamline --game put there stays.
  • Settled, as a maintainer asked for this change: nothing of NVIDIA's enters the repository (#2748's headers are
    downloaded at build time, this runtime from NVIDIA's release on each PC, after the player's consent), and the
    launcher embeds the texts of the licenses the player accepts, as it does DLSS's (LongshotLauncher's side).

Read first: runtimes.rs (takes_streamline, sl_runtime, sl_runtime_cached, unzip), then play.rs in
build-driver (streamline_wanted, key, rebuild_reason), build.rs (the removal, the record), and
longshot-builder/src/play.rs (managed_play).

Known limits, by design for now:

  • longshot-builder build --profile and update --profile have no installation: they build without Streamline's
    runtime, and the installation's next play updates again (the files come from the cache while it keeps them). The
    launcher's Rebuild runs build --profile from the installation's own builder, so after a Rebuild the next Play
    puts the runtime back. Having build read launcher-instance.json beside it would avoid that; left for later.
  • info --profile reads the profile alone: for an installation that takes Streamline it says stale where play finds
    the folder up to date. The launcher does not read info's up_to_date for an installation (only present and the
    capabilities), and reads the record's streamline.
  • Choosing Streamline or taking it back changes the profile's key, so the update says the profile changed (its log
    line and its message, "10 to 20 minutes", are an upscaler change's) where it is a download or a removal: a finer
    message needs the stamp to say which part of the key changed.
  • Known elsewhere, not fixed here: the frame generation setting DLSS FG through Streamline needs has been reported to
    turn itself off after a restart (not reproduced yet; a separate fix).

Testing

Tested: Windows 11, RTX 4090, NVIDIA 621.24, the game in fullscreen on a 2560x1440 120 Hz screen. An installation
as a launcher makes one (Longshot.exe = this branch's longshot-builder, launcher-instance.json with "upscalers": ["dlss"], a profile built by build --profile ... --upscaler dlss --accept-licenses nvidia, then
licenses.streamline at the pin in its profile.json), each run Longshot.exe play --profile-id through the PC's job
queue, to the title menu, then quit:

  1. An installation with "streamline": true and the receipt, its first play (RX_VK_DLSS=1, RX_VK_DLSS_FG=1,
    RX_VK_FRAMEGEN_MULT=2): the fast check said another builder, the update downloaded the zip once (276 MB), the
    record says placed with the ten files in its files, and the game's log has vk: Streamline started for DLSS Frame Generation, vk: Streamline: DLSS Frame Generation ready (up to 2x), Streamline Reflex: on and
    vk: NVIDIA DLSS: NGX started, at the title menu.

  2. The choice taken back ("streamline": false): the fast check said the profile's game files, upscalers or Streamline choice changed, the update took the ten files out (streamline gone from the record), and the game's
    log has vk: NVIDIA DLSS: NGX started, DLSS FG through NGX, and no vk: Streamline line.

  3. Another sl.interposer.dll put by hand (a few bytes, not NVIDIA's), the choice back: the update says
    sl.interposer.dll in the game folder is not the pinned one: left as it is (delete it to get the pinned one), the
    record says kept, nothing else is put there or downloaded, and the game's log says vk: Streamline: sl.interposer.dll has no valid NVIDIA signature: not loaded, then DLSS and DLSS FG through NGX.

  4. Offline, simulated with the network left on (the ten files taken out of the game folder and the cache, and
    HTTPS_PROXY to a port nothing listens on):

    • the update says streamline_skipped (... could not be downloaded (curl failed (exit code: 7))), the record
      says skipped, the cache's mark says download, and the game starts with vk: NVIDIA DLSS: NGX started and DLSS
      FG through NGX;
    • a play two minutes later, still offline: the fast check does not give NVIDIA Streamline's files were left out of the last build (the mark is recent; check asks it before the shaders) but the shaders are to be prepared again, and that update tries the download again and leaves it out again, as any update does;
    • the mark made 11 minutes old, back online: the fast check says NVIDIA Streamline's files were left out of the last build, the update downloads the zip, the record says placed, the mark is gone, and the game has vk: Streamline started for DLSS Frame Generation.

    Every play of this installation also asked for the shaders are to be prepared again once nothing else did,
    though each preparation ends done shaders. It is not this pull request's: with #2748's builder alone (neither
    touches shaders.rs or the shader caches), the same installation's second play in a row also says it. Where it
    happens, each play updates and so tries Streamline's download again, the 10 minutes notwithstanding (see Risks).

  • tests/run_all.py --changed origin/main: 812 passed, 23 failed, 53 skipped. 22 of them fail the same on an archive
    of origin/main here (--exact: this PC's toolchain); tests/test_sampler_admission.py (nothing this change
    touches) fails 4 runs in 5 here and 5 in 5 on main, the same assertion. tests/test_sl_sdk.py: 22 passed.
  • cargo clippy --workspace --all-targets -- -D warnings and cargo fmt --all --check pass; cargo test --workspace:
    the new tests pass, and the 14 that fail are among the 15 that fail on main @ 22d0d2009 here (llvm-mc, the
    linker's and paths' tests of this PC).
  • The head since, 2ab1debd1, is the same code: rebased on #2748's 069c61a4d (a line of docs/dev/setup.md, which this
    pull request's commit already rewrote) and a line of docs/dev/reference/build.md (info's stale in its own
    words); the runs above are of b11fe4536. At 2ab1debd1, tests/run_all.py --changed origin/main: 811 passed, 23
    failed, 54 skipped, the same 23 as above.
  • Linux, the builder at 2ab1debd1 in the CI's checks image (scripts/linux/checks.Dockerfile, built locally, in WSL):
    cargo clippy --locked --workspace --all-targets -- -D warnings passes, and cargo test --locked -p build-driver -p longshot-builder passes whole (188 tests in build-driver's library, the Streamline ones among them).
The failures that also fail on main here

tests/run_all.py: test_auto_handheld.py, test_bug_report.py, test_builder_channel.py, test_control_picture.py, test_coverage_run.py, test_crash_record.py, test_dev_ab.py, test_dev_build.py, test_dev_migrate.py, test_framegen_resources.py, test_game_menu_mouse_buttons.py, test_input_movie.py, test_job_queue.py, test_oot_menu_mouse.py, test_pads_after_menu.py, test_parity_gates.py, test_perf_send.py, test_present_source_crop.py, test_run_all_mingw.py, test_screensaver.py, test_switch_table.py, test_xinput_thread.py.

cargo test --workspace on main @ 22d0d2009: a_lifted_unit_s_text_made_on_demand_compiles_to_its_file_s_object_and_is_kept_by_its_key, an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches, doctor::tests::no_gpu_reads_as_the_game_s_header_does, from_source::cargo::tests::the_release_s_flags_name_no_path_of_this_pc, link::tests::the_linker_s_list_is_parted_from_its_output, matches_llvm_mc, nup::tests::a_package_reads_back, packages::tests::a_header_package_too_old_is_no_package, play::tests::a_first_run_writes_the_profile_from_the_copy_given_or_chosen, steam_cmd::tests::the_tile_plays_the_profile_given_with_play_first_when_the_program_needs_it, tests::a_build_for_a_profile_writes_profile_json_and_builds_its_folder_beside_the_program, tests::mod_calls_the_hook_with_a_context_and_its_status, tests::recomplauncher_s_build_step_is_a_command_line_it_takes, toolchain::tests::a_windows_link_of_the_same_inputs_makes_the_same_bytes, toolchain::tests::the_builder_s_llvm_comes_before_emsdk_and_the_path.

Still to test:

  • Windows, RTX 20 or 30: an installation with Streamline, expecting vk: Streamline: ... DLSS Frame Generation does not go through it in this run and the game's own frame generation (@Beanstalk, not sent: a maintainer's call)
  • Windows, RTX 50: the same, expecting vk: Streamline started for DLSS Frame Generation (@Beanstalk, not sent)
  • Linux: an installation with "streamline": true, expecting no Streamline download and the game as on main (by
    hand or @Beanstalk, not sent)

Measurements

Nothing to measure in this pull request: it puts files in the game folder; how DLSS FG runs through Streamline is the renderer's, measured where it was added (and no switch is added: LONGSHOT_CACHE in the diff is a test's stand-in for the existing cache folder variable).

Risks

  • A player who chose Streamline downloads 276 MB once per Streamline release; the zip is deleted after.
  • Offline, or a download that fails: the game starts with DLSS as today, and a play of that installation tries an
    update again at most every 10 minutes until it is had; behind a firewall that drops packets a try costs up to about 4
    minutes (curl's 60 s connect time-out, 3 retries). A cache that can't be written keeps no mark, and each play tries.
    A play that updates for another reason tries too: on this PC every play of an installation updated for its shaders
    (the shaders are to be prepared again, with or without this pull request), so there each offline play tries again;
    that check is a separate issue.
  • A launcher of today writes no "streamline" and no receipt: nothing changes for its players.
  • NVIDIA's files stay on the player's PC: the licenses beside them say so, and a game folder built with them must not
    be shared (as with DLSS's).
  • To turn it off: RX_VK_DLSSG=0 in longshot_env.txt, or the installation's choice taken back. A revert stops new
    downloads, but the files already put in a game folder stay there, and the game still uses them until they are
    deleted.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. No host C or C++ in the diff; the builder
    it changes builds and passes its tests on Windows here and on Linux in the CI's checks image (Testing). CI's own run
    of the head is still to come.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary Stacked on #2748: read its Summary first; this pull request's own commit is the last one. With #2748 every Windows build with DLSS compiles DLSS Frame Generation through NVIDIA Streamline, but no build puts Streamline's runtime beside the game, so no player gets it. This puts it there for a player who chose it and accepted NVIDIA's licenses for it, and for no one else. - **Who gets it.** A Windows build with DLSS of a profile played by an installation that takes Streamline: the installation's choice, `launcher-instance.json`'s `"streamline": true` (beside `"upscalers"`, format 1; missing is false), which managed play (`play --profile-id`) reads; and the profile's receipt, `profile.json`'s `licenses.streamline` at the builder's pin (the 2.14.16 release's commit), which the launcher writes once the player accepted NVIDIA's licenses for it. The builder never writes that receipt. The receipt is the consent alone; the choice is per installation. Not on Linux (Streamline has no Linux runtime: a Linux installation that says it takes it keeps its key), not with a developer's `LONGSHOT_SL_SDK`. - **What it gets.** The release's zip (276 MB, its SHA-256 checked) is downloaded once, its seven runtime DLLs and the three licenses they are under taken out with the system's `tar` (System32's), each checked against its SHA-256, kept in `<cache>/runtimes/`, and the zip deleted. They go beside `longshot.exe`, the licenses as `LICENSE-NVIDIA-STREAMLINE.txt`, `LICENSE-NVIDIA-DLSS-FG.txt` and `LICENSE-NVIDIA-REFLEX.txt`. Once there, the pinned files are kept as they are by every later build, with no cache and no network (offline, or after the cache's prune), and noted again as the builder's when the note lost them, so taking Streamline away still takes them out. `tar` is given the zip and the folder by their ASCII names from the cache's folder, whose path may not be ASCII. - **What the record says.** `longshot_build.json`'s `streamline`: `placed`; `kept` (a file of it there is not the builder's, another release's: all of it left as it is, nothing downloaded); `skipped` (it couldn't be had); absent when the build was not asked for it. The launcher reads it there to show what is in the game folder. `info`'s `build.streamline` says it too, and the builder's capabilities gain `streamline`. - **When it can't be had** (offline, a SHA-256 not the pinned one, no `tar`, a zip that can't be unpacked): one `streamline_skipped` warning, and the build goes on with DLSS as without Streamline. A play of the installation updates the game folder to try again (a new `RebuildReason::Streamline`) when the cache's mark of the last try says it is time (`<cache>/runtimes/sl-runtime-<pin's first 12>.tried`, `runtimes::sl_retry_due`): 10 minutes after a download that failed, so a player with no network is not held up at every play; never at a play after files that are not the pinned ones or a zip that can't be unpacked (276 MB each time, and no different: any other build or update, and the next builder, try again). A `kept` one is not tried again, or every play would update. - **The key.** The choice goes in the profile's key like the upscalers, and only when it is wanted (chosen, accepted at the pin, DLSS): every other profile keeps the key an earlier builder wrote, so it gets no update (a test pins the formula). Choosing it or taking it back is an update of the same game folder. - **Taking it back.** A build not asked for it downloads nothing and takes out the files an earlier build of the builder's put there; a file the player or `scripts/fetch.py streamline --game` put there stays. - **Settled**, as a maintainer asked for this change: nothing of NVIDIA's enters the repository (#2748's headers are downloaded at build time, this runtime from NVIDIA's release on each PC, after the player's consent), and the launcher embeds the texts of the licenses the player accepts, as it does DLSS's (LongshotLauncher's side). Read first: `runtimes.rs` (`takes_streamline`, `sl_runtime`, `sl_runtime_cached`, `unzip`), then `play.rs` in `build-driver` (`streamline_wanted`, `key`, `rebuild_reason`), `build.rs` (the removal, the record), and `longshot-builder/src/play.rs` (`managed_play`). Known limits, by design for now: - `longshot-builder build --profile` and `update --profile` have no installation: they build without Streamline's runtime, and the installation's next play updates again (the files come from the cache while it keeps them). The launcher's Rebuild runs `build --profile` from the installation's own builder, so after a Rebuild the next Play puts the runtime back. Having `build` read `launcher-instance.json` beside it would avoid that; left for later. - `info --profile` reads the profile alone: for an installation that takes Streamline it says `stale` where play finds the folder up to date. The launcher does not read `info`'s `up_to_date` for an installation (only `present` and the capabilities), and reads the record's `streamline`. - Choosing Streamline or taking it back changes the profile's key, so the update says the profile changed (its log line and its message, "10 to 20 minutes", are an upscaler change's) where it is a download or a removal: a finer message needs the stamp to say which part of the key changed. - Known elsewhere, not fixed here: the frame generation setting DLSS FG through Streamline needs has been reported to turn itself off after a restart (not reproduced yet; a separate fix). ## Testing **Tested:** Windows 11, RTX 4090, NVIDIA 621.24, the game in fullscreen on a 2560x1440 120 Hz screen. An installation as a launcher makes one (`Longshot.exe` = this branch's `longshot-builder`, `launcher-instance.json` with `"upscalers": ["dlss"]`, a profile built by `build --profile ... --upscaler dlss --accept-licenses nvidia`, then `licenses.streamline` at the pin in its `profile.json`), each run `Longshot.exe play --profile-id` through the PC's job queue, to the title menu, then quit: 1. An installation with `"streamline": true` and the receipt, its first play (`RX_VK_DLSS=1`, `RX_VK_DLSS_FG=1`, `RX_VK_FRAMEGEN_MULT=2`): the fast check said `another builder`, the update downloaded the zip once (276 MB), the record says `placed` with the ten files in its `files`, and the game's log has `vk: Streamline started for DLSS Frame Generation`, `vk: Streamline: DLSS Frame Generation ready (up to 2x)`, `Streamline Reflex: on` and `vk: NVIDIA DLSS: NGX started`, at the title menu. 2. The choice taken back (`"streamline": false`): the fast check said `the profile's game files, upscalers or Streamline choice changed`, the update took the ten files out (`streamline` gone from the record), and the game's log has `vk: NVIDIA DLSS: NGX started`, DLSS FG through NGX, and no `vk: Streamline` line. 3. Another `sl.interposer.dll` put by hand (a few bytes, not NVIDIA's), the choice back: the update says `sl.interposer.dll in the game folder is not the pinned one: left as it is (delete it to get the pinned one)`, the record says `kept`, nothing else is put there or downloaded, and the game's log says `vk: Streamline: sl.interposer.dll has no valid NVIDIA signature: not loaded`, then DLSS and DLSS FG through NGX. 4. Offline, simulated with the network left on (the ten files taken out of the game folder and the cache, and `HTTPS_PROXY` to a port nothing listens on): - the update says `streamline_skipped` (`... could not be downloaded (curl failed (exit code: 7))`), the record says `skipped`, the cache's mark says `download`, and the game starts with `vk: NVIDIA DLSS: NGX started` and DLSS FG through NGX; - a play two minutes later, still offline: the fast check does not give `NVIDIA Streamline's files were left out of the last build` (the mark is recent; `check` asks it before the shaders) but `the shaders are to be prepared again`, and that update tries the download again and leaves it out again, as any update does; - the mark made 11 minutes old, back online: the fast check says `NVIDIA Streamline's files were left out of the last build`, the update downloads the zip, the record says `placed`, the mark is gone, and the game has `vk: Streamline started for DLSS Frame Generation`. Every play of this installation also asked for `the shaders are to be prepared again` once nothing else did, though each preparation ends `done shaders`. It is not this pull request's: with #2748's builder alone (neither touches `shaders.rs` or the shader caches), the same installation's second play in a row also says it. Where it happens, each play updates and so tries Streamline's download again, the 10 minutes notwithstanding (see Risks). - `tests/run_all.py --changed origin/main`: 812 passed, 23 failed, 53 skipped. 22 of them fail the same on an archive of `origin/main` here (`--exact`: this PC's toolchain); `tests/test_sampler_admission.py` (nothing this change touches) fails 4 runs in 5 here and 5 in 5 on `main`, the same assertion. `tests/test_sl_sdk.py`: 22 passed. - `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --all --check` pass; `cargo test --workspace`: the new tests pass, and the 14 that fail are among the 15 that fail on `main` @ 22d0d2009 here (`llvm-mc`, the linker's and paths' tests of this PC). - The head since, 2ab1debd1, is the same code: rebased on #2748's 069c61a4d (a line of `docs/dev/setup.md`, which this pull request's commit already rewrote) and a line of `docs/dev/reference/build.md` (`info`'s `stale` in its own words); the runs above are of b11fe4536. At 2ab1debd1, `tests/run_all.py --changed origin/main`: 811 passed, 23 failed, 54 skipped, the same 23 as above. - Linux, the builder at 2ab1debd1 in the CI's checks image (`scripts/linux/checks.Dockerfile`, built locally, in WSL): `cargo clippy --locked --workspace --all-targets -- -D warnings` passes, and `cargo test --locked -p build-driver -p longshot-builder` passes whole (188 tests in `build-driver`'s library, the Streamline ones among them). <details><summary>The failures that also fail on <code>main</code> here</summary> `tests/run_all.py`: `test_auto_handheld.py`, `test_bug_report.py`, `test_builder_channel.py`, `test_control_picture.py`, `test_coverage_run.py`, `test_crash_record.py`, `test_dev_ab.py`, `test_dev_build.py`, `test_dev_migrate.py`, `test_framegen_resources.py`, `test_game_menu_mouse_buttons.py`, `test_input_movie.py`, `test_job_queue.py`, `test_oot_menu_mouse.py`, `test_pads_after_menu.py`, `test_parity_gates.py`, `test_perf_send.py`, `test_present_source_crop.py`, `test_run_all_mingw.py`, `test_screensaver.py`, `test_switch_table.py`, `test_xinput_thread.py`. `cargo test --workspace` on `main` @ 22d0d2009: `a_lifted_unit_s_text_made_on_demand_compiles_to_its_file_s_object_and_is_kept_by_its_key`, `an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches`, `doctor::tests::no_gpu_reads_as_the_game_s_header_does`, `from_source::cargo::tests::the_release_s_flags_name_no_path_of_this_pc`, `link::tests::the_linker_s_list_is_parted_from_its_output`, `matches_llvm_mc`, `nup::tests::a_package_reads_back`, `packages::tests::a_header_package_too_old_is_no_package`, `play::tests::a_first_run_writes_the_profile_from_the_copy_given_or_chosen`, `steam_cmd::tests::the_tile_plays_the_profile_given_with_play_first_when_the_program_needs_it`, `tests::a_build_for_a_profile_writes_profile_json_and_builds_its_folder_beside_the_program`, `tests::mod_calls_the_hook_with_a_context_and_its_status`, `tests::recomplauncher_s_build_step_is_a_command_line_it_takes`, `toolchain::tests::a_windows_link_of_the_same_inputs_makes_the_same_bytes`, `toolchain::tests::the_builder_s_llvm_comes_before_emsdk_and_the_path`. </details> **Still to test:** - Windows, RTX 20 or 30: an installation with Streamline, expecting `vk: Streamline: ... DLSS Frame Generation does not go through it in this run` and the game's own frame generation (`@Beanstalk`, not sent: a maintainer's call) - Windows, RTX 50: the same, expecting `vk: Streamline started for DLSS Frame Generation` (`@Beanstalk`, not sent) - Linux: an installation with `"streamline": true`, expecting no Streamline download and the game as on `main` (by hand or `@Beanstalk`, not sent) ## Measurements Nothing to measure in this pull request: it puts files in the game folder; how DLSS FG runs through Streamline is the renderer's, measured where it was added (and no switch is added: `LONGSHOT_CACHE` in the diff is a test's stand-in for the existing cache folder variable). ## Risks - A player who chose Streamline downloads 276 MB once per Streamline release; the zip is deleted after. - Offline, or a download that fails: the game starts with DLSS as today, and a play of that installation tries an update again at most every 10 minutes until it is had; behind a firewall that drops packets a try costs up to about 4 minutes (curl's 60 s connect time-out, 3 retries). A cache that can't be written keeps no mark, and each play tries. A play that updates for another reason tries too: on this PC every play of an installation updated for its shaders (`the shaders are to be prepared again`, with or without this pull request), so there each offline play tries again; that check is a separate issue. - A launcher of today writes no `"streamline"` and no receipt: nothing changes for its players. - NVIDIA's files stay on the player's PC: the licenses beside them say so, and a game folder built with them must not be shared (as with DLSS's). - To turn it off: `RX_VK_DLSSG=0` in `longshot_env.txt`, or the installation's choice taken back. A revert stops new downloads, but the files already put in a game folder stay there, and the game still uses them until they are deleted. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. No host C or C++ in the diff; the builder it changes builds and passes its tests on Windows here and on Linux in the CI's checks image (Testing). CI's own run of the head is still to come. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
longshot-builder downloads NVIDIA Streamline 2.14.16's MIT license and the 13
headers gpu/vk/vk_dlssg.cpp includes, from Streamline's repository at the
release tag's commit, each checked against its SHA-256 (runtimes.rs SL_REPO,
SL_HEADERS), for every Windows build with DLSS. They go in
<cache>/runtimes/sl-<pin>/, which the compile takes as LONGSHOT_SL_SDK; a
developer's own LONGSHOT_SL_SDK still wins. No license to accept: the files
are MIT. None of Streamline's runtime comes with them, so a game folder
without it runs as before.

A header that can't be downloaded leaves Streamline out of that build alone:
one streamline_skipped warning, and the build goes on with DLSS.

tests/test_sl_sdk.py checks the builder's table against scripts/sl_sdk.py's
(same release, same SHA-256, only MIT files, the include closure of
vk_dlssg.cpp).

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
As for the NGX SDK folder, a .used mark that can't be written is let go.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(builder): Streamline's headers stay usable offline once had, and their warning keeps DLSS
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
5460db724a
- A file of the Streamline SDK folder already there and pinned is taken as it is: after the cache's prune let its
  cached copy go, an offline build still compiles Streamline.
- streamline_skipped no longer carries the download's advice to build without the upscaler: DLSS stays.
- tests: the failure through fetch itself; every Streamline header gpu/ and host/ include is one the builder fetches.
- docs: what a build downloads (updates-and-saves.md), the SDK folder's name.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat(builder): NVIDIA Streamline's runtime for an installation that takes it
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b11fe45366
An installation whose launcher-instance.json says "streamline": true, with the
profile's receipt for NVIDIA's Streamline licenses at the pin
(licenses.streamline), gets Streamline's runtime beside longshot.exe on
Windows with DLSS: the seven DLLs out of the 2.14.16 release's zip (checked by
SHA-256, kept in the cache, the zip deleted) and NVIDIA's three licenses. The
record says what came of it (longshot_build.json's "streamline": placed, kept
or skipped) and info lists the "streamline" capability.

A runtime file there that is not the builder's is the player's: all of it is
kept and nothing is downloaded. One that can't be had leaves Streamline out of
that build (streamline_skipped), never the build; a play tries again 10
minutes after a failed download, never at a play after files that are not the
pinned ones. Pinned files already beside the game are kept with no cache and
no network. A build not asked for it takes out what the builder put there.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Tested in game: Windows 11, RTX 4090, NVIDIA 621.24, fullscreen 2560x1440 at 120 Hz, an installation as a launcher makes one (this head b11fe4536's longshot-builder as Longshot.exe, play --profile-id, to the title menu): with the choice and the receipt the runtime is put there (record placed) and the game logs vk: Streamline started for DLSS Frame Generation and NGX started; the choice taken back takes the ten files out and DLSS FG goes through NGX; a player's own sl.interposer.dll is left as it is (kept) and not loaded; offline (simulated) the build is skipped with DLSS as today, and a play after 10 minutes online puts it there.

Tested in game: Windows 11, RTX 4090, NVIDIA 621.24, fullscreen 2560x1440 at 120 Hz, an installation as a launcher makes one (this head b11fe4536's longshot-builder as Longshot.exe, play --profile-id, to the title menu): with the choice and the receipt the runtime is put there (record placed) and the game logs vk: Streamline started for DLSS Frame Generation and NGX started; the choice taken back takes the ten files out and DLSS FG goes through NGX; a player's own sl.interposer.dll is left as it is (kept) and not loaded; offline (simulated) the build is skipped with DLSS as today, and a play after 10 minutes online puts it there.
Member

Possibly related, for context:

  • issue #1350 Idea: Streamline DLSS. — Original request for Streamline DLSS frame generation
Possibly related, for context: - issue #1350 Idea: Streamline DLSS. — Original request for Streamline DLSS frame generation
Author
Contributor

A correction to the "Tested in game" comment above: "a play after 10 minutes online" was a play with the cache's mark made 11 minutes old by hand, not 10 minutes waited, as Testing's run 4 says. That run also found every play of the installation updating for its shaders (the shaders are to be prepared again), with this branch and with #2748's builder alone: not this pull request's, but it means the 10 minutes don't hold where that happens (Testing and Risks).

A correction to the "Tested in game" comment above: "a play after 10 minutes online" was a play with the cache's mark made 11 minutes old by hand, not 10 minutes waited, as Testing's run 4 says. That run also found every play of the installation updating for its shaders (`the shaders are to be prepared again`), with this branch and with #2748's builder alone: not this pull request's, but it means the 10 minutes don't hold where that happens (Testing and Risks).
Jiro113 force-pushed feat/builder-streamline-receipt from b11fe45366
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 2ab1debd1a
Some checks failed
PR description / Title and description (pull_request_target) Successful in 9s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-28 17:55:30 +00:00
Compare
Author
Contributor

Superseded by #2748, which now carries the runtime step.

Superseded by #2748, which now carries the runtime step.
Jiro113 closed this pull request 2026-11-29 04:05:46 +00:00
Some checks failed
PR description / Title and description (pull_request_target) Successful in 9s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!2749
No description provided.