feat(builder): DLSS FG through Streamline from its MIT headers, and its runtime for a profile that takes it #2748

Merged
HumanBean merged 9 commits from Jiro113/Longshot:feat/builder-streamline-headers into main 2026-11-29 20:49:46 +00:00
Contributor

Summary

DLSS Frame Generation through NVIDIA Streamline is compiled into a player's game only when a developer points
LONGSHOT_SL_SDK at Streamline's SDK, and no build puts Streamline's runtime beside the game, so no player has it.
This brings it to players in one pull request: every Windows build with DLSS compiles the Streamline layer from
Streamline's MIT headers, now in the repository, and the builder puts Streamline's runtime beside the game for a
player who chose it and accepted NVIDIA's licenses for it, and for no one else.

  • The headers, in the repository (first commit). third_party/streamline holds Streamline 2.14.16's MIT
    license.txt and the 13 headers DLSS FG through Streamline compiles with: the six gpu/vk/vk_dlssg.cpp includes and
    the seven they include in turn (vk_dlssg_layer.cpp is built with the same flags and includes none), unmodified but
    for LF, with their PROVENANCE.md: the release tag's commit, the upstream blob ids, the license
    reading and the tree-sha256 that scripts/check_third_party.py checks. Eleven headers carry the MIT notice;
    sl_appidentity.h and sl_device_wrappers.h carry none (as upstream, on main too) and come under license.txt, whose
    one exception names sl_nvperf.h/.dll, which are not taken. Nothing else of NVIDIA's is in the repository: no DLL,
    no zip, no other license, no other header. CONTRIBUTING says so beside XeSS's headers.
  • The compile (second commit). packages::sl_sdk takes a developer's LONGSHOT_SL_SDK first, as before (with a
    wrong one the build goes without Streamline and a note says why; the tree's never takes its place), else the tree's
    third_party/streamline for a Windows build with DLSS, as XeSS's headers are taken. Nothing is downloaded for the compile. Without Streamline's runtime beside
    longshot.exe, dlssg_load returns before doing anything, so the game runs as a build without Streamline. CI's
    vulkan-dlss job compiles from the tree, with no SDK step.
  • Who gets the runtime (third commit). A Windows build with DLSS of a profile that takes Streamline: the profile's
    choice, profile.json's "streamline": true, and its receipt, 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. build --profile <id | dir> --streamline on|off writes the choice, as --prepare-shaders writes
    its own: true written, the key taken out when off (so a profile never chosen keeps its bytes), any other value
    makes the profile unreadable, said. play, build (the launcher's Rebuild), verify --repair and info read it
    from the profile, whether --profile is a launcher's ID or a folder, so a Rebuild or a repair keeps the runtime its
    play put, and info's fast check agrees with play's. launcher-instance.json carries no Streamline. Since
    #2791, an installed version's version.json selects its upscalers, so whether the build has DLSS is the version's;
    the choice and its receipt stay the profile's, as the licenses do (a test pins the two together). Not on Linux
    (Streamline has no Linux runtime), not with a developer's LONGSHOT_SL_SDK (its runtime is the developer's to put
    there).
  • 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.
  • 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. 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 tar that fails): one
    streamline_skipped warning, and the build goes on with DLSS as without Streamline. A play of the profile
    updates the game folder to try again (RebuildReason::Streamline) when the cache's mark of the last try says it is
    time (<cache>/runtimes/sl-runtime-<pin's first 12>.tried): 10 minutes after a download that failed or a first tar
    that failed on the pinned zip (a full disk, a file held); never at a play after files that are not the pinned ones,
    with no tar at all, or after a tar that failed twice (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 a change of the profile, 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: Streamline's MIT headers and their license are in the
    repository, as FSR's and XeSS's are, and nothing else of NVIDIA's enters it (its runtime comes from NVIDIA's release
    on each PC, after the player's consent); the launcher embeds the texts of the licenses the player accepts, as it
    does DLSS's (LongshotLauncher's side). This pull request now also carries the runtime step, formerly #2749. The
    choice is the profile's, written by build --streamline, as the owner decided over a field of
    launcher-instance.json (which the launcher of #2762's protocol 2 no longer writes) or a flag on every command.

Read first: third_party/streamline/PROVENANCE.md, packages.rs (sl_sdk), then runtimes.rs (takes_streamline,
sl_runtime, sl_runtime_cached, unzip), play.rs in build-driver (streamline_wanted, key,
rebuild_reason, Profile::read and synced for "streamline"), build.rs (the removal, the record), and in
longshot-builder main.rs (--streamline), play.rs (Settings.streamline, profile_for) and info.rs.
tests/test_sl_sdk.py checks the tree's files are the release's (with CRLF back, the SHA-256s scripts/sl_sdk.py
pins), all under the MIT license, the whole include closure of what gpu/ and host/ include, and that the builder's
runtime is the same release's files as the script's.

Known limits, by design for now:

  • Nothing changes for a player until the launcher takes its part
    (MagicBeanDev/LongshotLauncher#344): it writes licenses.streamline at the pin
    once the player accepted NVIDIA's licenses, and passes --streamline on|off to build --profile, when info's
    capabilities list streamline. A launcher of today writes neither, and --accept-licenses takes no streamline.
  • --streamline on on Linux, without DLSS or without the receipt writes the choice and puts nothing: the build says
    nothing of it (the key and the record are as without it).
  • Choosing Streamline or taking it back changes the profile's key, so the update says the profile changed (an upscaler
    change's line and message) where it is a download or a removal.
  • No switch is added (the check's "A switch added or changed" box does not apply): LONGSHOT_CACHE and
    LONGSHOT_NO_PREPARE in the tests are the builder's existing variables (its cache folder, and no shader
    preparation), read by the builder only, not renderer or host settings (gpu/vk/switches.def lists those), so they
    have no row there, and their defaults do not change.
  • gpu/vk/vk_dlssg.h's first comment still says the layer is built in with LONGSHOT_SL_SDK: that header is a
    reviewed source of two guide screenshots (docs/user/images/guide/manifest.json), so it is left for a change that
    checks them again.
  • 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, without LONGSHOT_SL_SDK, every build, test and game run through
the PC's job queue. The game runs and the Linux checks below ran at 93884ed8b, on main @ 5468280d9, before the
rebases; the checks without the game ran again at this head (318b0dee2, on main @ 6f5f99fce), as After the rebases
says. The game ran in fullscreen on a 2560x1440 120 Hz screen, with the sound off, RX_VK_DLSS=1, RX_VK_DLSS_FG=1 and RX_VK_FRAMEGEN_MULT=2. Each run went to the title
menu and was quit by the control pipe.

  • The setup. An installation made the way the launcher of #2762's protocol 2 makes one: Longshot.exe is
    93884ed8b's longshot-builder and the cache is in LONGSHOT_CACHE. There is no launcher-instance.json. A profile folder
    was first built by build --profile <dir> --game ... --upscaler dlss --accept-licenses nvidia, then given
    licenses.streamline at the pin in its profile.json, as the launcher writes it. Everything below passes
    --profile <dir> (a folder, as protocol 2 does); reading by a launcher's ID is covered by the unit tests only.

  • build --profile <dir> ... --streamline on (a Rebuild that chooses it):

    • it wrote "streamline": true into profile.json;
    • it compiled from the tree (the Vulkan back end: with NVIDIA Streamline's DLSS Frame Generation (NVIDIA Streamline's SDK in <checkout>\third_party/streamline));
    • it put the ten files there, and the record says placed, with the ten in its files;
    • they came from the cache, which held them from an earlier run: nothing was downloaded this time.

    info --profile <dir> then gave up_to_date: true and build.streamline: placed.

  • play --profile <dir>. The fast check said up to date. The game's log has, in order:

    • vk: Streamline started for DLSS Frame Generation
    • vk: Streamline: DLSS Frame Generation ready (up to 2x)
    • vk: Streamline Reflex: on
    • vk: NVIDIA DLSS: NGX started

    On quitting, it has vk: Streamline shut down for the exit (result 0), and the game exited with code 0 (BeanBot's
    L3).

  • verify --repair --profile <dir>, with sl.common.dll deleted from the game folder. It said repaired: sl.common.dll, and the record stayed placed with the ten files.

  • build --profile <dir> with no --streamline. It took the profile's choice: an exit code of 0 in under a
    second, nothing compiled, downloaded or taken out, and the record still placed.

  • build --profile <dir> ... --streamline off.

    • The fast check said the profile's game files, upscalers or Streamline choice changed.
    • The update took the ten files out (LICENSE-NVIDIA-DLSS-FG.txt, ... sl.reflex.dll removed).
    • streamline is gone from the record, and the key is gone from profile.json; the receipt stays.
    • info then gave up_to_date: true and no build.streamline.
  • play after that (the layer compiled in, no runtime beside the game). The log has vk: NVIDIA DLSS: NGX started and vk: DLSS Frame Gen (NGX): available, up to 1 made frames between two of the game's, and no vk: Streamline line. The game exited with code 0.

  • Earlier heads. The runtime step's other cases ran on b11fe4536 (then #2749), whose download and placing code this
    head keeps; they were not run again here:

    • another sl.interposer.dll put there by hand: kept, and nothing downloaded;
    • offline: streamline_skipped and skipped, and the game ran with DLSS FG through NGX;
    • 11 minutes later and back online: the 276 MB zip downloaded, placed, and Streamline started in the game.
  • The tests' own mutants, at 93884ed8b. Each mutant was put back after its run. With the choice left out of
    Profile::key_on (its k.text("streamline", ...) line deleted),
    the_profile_s_streamline_changes_the_key_only_when_wanted_and_one_left_out_is_tried_again fails on Windows and on
    Linux. Without info's installation upscalers (then p.upscalers = ups;, deleted),
    info_by_a_launcher_s_id_takes_its_installation_s_upscalers_as_its_play_does fails. Since the rebase that line is
    #2791's (clone_from of the version's upscalers), not this change's; the test still passes at this head.

  • The build's time and size against main (BeanBot's L1), on this PC through the job queue: as Measurements says.

  • Linux, 93884ed8b (its tree checked equal to the commit's) in the CI's checks image
    (scripts/linux/checks.Dockerfile, built locally, in WSL):

    • cargo clippy --locked --workspace --all-targets -- -D warnings passes;
    • cargo test --locked -p build-compile -p build-driver -p longshot-builder passes whole (188 tests in
      build-driver's library);
    • cargo fmt there reports the same host_sources_tests.rs line.
  • After the rebases, at this head (318b0dee2) on main @ 6f5f99fce:

    • The last rebase met #2765 and #2794 in play.rs: rebuild_reason takes both #2765's profile and this change's
      Streamline flag, and Profile::key drops the language as #2794 does while keeping Streamline's pin when wanted. A
      new test, a_play_weighs_streamline_left_out_and_the_profile_s_shaders_together, passes at this head; the
      rebase's comment
      says what it
      holds and how it fails without the resolution.
    • The rebase before it met #2791 in info.rs and build.md: info keeps #2791's upscalers (an installed version's
      version.json first) and takes the profile's Streamline choice and the launcher id's cache, as play does.
      git range-diff shows the first two commits unchanged and the third changed only there and in profiles.md
      (which says the same of a profile folder).
    • A new test, an_installed_version_s_dlss_and_the_profile_s_streamline_choice_decide_streamline_together, builds and
      repairs a profile by folder and by id with a version.json of DLSS and a profile of none, then the other way round:
      the version's upscalers are taken, the profile's choice kept, and Streamline is wanted only with the version's DLSS.
      With profile_of's p.upscalers = modules; deleted, it fails ([] against [Dlss]); put back, it passes.
    • The Streamline retry's text had lost a line continuation, so the player read a run of spaces mid-sentence (a cold
      review found it). the_update_s_text_has_one_space_between_its_words fails at 686fcede8 for that and passes with
      the fix.
    • The builder of this head, in a scratch folder with a dummy package: info --profile <dir> --output json lists
      streamline in the builder's capabilities; build --profile <dir> --streamline on writes "streamline": true;
      play --profile <dir> runs the fast check and starts a build; --streamline off takes the key out (the builds
      then stop on the dummy package, as expected). The check with a version.json of FSR alone beside the builder
      (info's upscalers ["fsr4"], the profile's staying ["dlss"]) ran at the previous head and not again here.
    • cargo test --workspace --locked --no-fail-fast: 791 passed, 12 failed. The same 12 fail on an archive of main @ 6f5f99fce here (774 passed; listed below). cargo clippy --workspace --all-targets --locked -- -D warnings fails, on main too: without -D warnings the workspace reports three warnings, the same three on main, at build-compile/src/lib.rs:894 and :901 (#2782) and build-driver/src/folder.rs:737 (#2794); none is in this change's code. cargo fmt --all --check passes.
    • tests/run_all.py --changed origin/main: 809 passed, 42 failed, 53 skipped. All 42 fail on that archive too, run with --exact. test_sampler_admission.py (two concurrent sampler cases; nothing this change touches) is unstable here: its cases fail in a different mix on each run, with the same assertion.
    • tests/test_sl_sdk.py passes.
The failures that also fail on main @ 6f5f99fce here, at this head

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_crt_options.py, test_dev_ab.py, test_dev_build.py, test_dev_migrate.py, test_dev_update.py, test_framegen_resources.py, test_game_menu_mouse_buttons.py, test_input_background.py, test_input_movie.py, test_job_queue.py, test_keyboard_menu_option.py, test_keyboard_option.py, test_linux_pressure.py, test_loaded_modules_drop.py, test_log_batch.py, test_log_levels.py, test_menu_keys.py, test_oot_menu_mouse.py, test_option_ids.py, test_parity_gates.py, test_perf_send.py, test_present_source_crop.py, test_program_cache_cleanup.py, test_program_cache_one_variant.py, test_run_all_mingw.py, test_sampler_admission.py, test_screensaver.py, test_switch_table.py, test_text_keyboard_policy.py, test_upscaler_round_trip.py, test_vcore_video_acquire.py, test_video_catchup.py, test_video_hold_early.py, test_video_input_limit.py, test_windows_display_startup.py, test_windows_on_linux.py.

cargo test --workspace: an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches, doctor::tests::no_gpu_reads_as_the_game_s_header_does, 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, tests::a_build_for_a_profile_writes_profile_json_and_its_settings, 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 (@Beanstalk, not sent: a maintainer's call, BeanBot's L2):
    • a build with DLSS without Streamline's runtime, expecting the same log as main (no vk: Streamline line);
    • a profile with Streamline, expecting vk: Streamline: ... DLSS Frame Generation does not go through it in this run
      and the game's own frame generation.
  • Windows, RTX 50: a profile with Streamline, expecting vk: Streamline started for DLSS Frame Generation
    (@Beanstalk, not sent).
  • Windows, a non-NVIDIA Tier 1 GPU: a build with DLSS, expecting the game as on main (@Beanstalk, not sent).
  • Linux, NVIDIA: a build with DLSS of a profile with "streamline": true, expecting no Streamline download and the
    game as on main (by hand or @Beanstalk, not sent).

Measurements

No switch is added or changed: LONGSHOT_CACHE and LONGSHOT_NO_PREPARE, which the new tests set, are the builder's existing variables, and they ship at the defaults they have on main.

Verdict: no build is slower beyond the spread; longshot_vk.dll is 112,128 bytes (0.6 %) larger, and nothing is downloaded.

The build's time and size, this change at 93884ed8b against main @ 5468280d9, its base (BeanBot's L1). Windows 11, i9-13900K (31 compile workers), 64 GB, NVMe, NVIDIA 621.24, 2026-11-29.

  • How: two clean clones, each with its own longshot-builder compiled from its tree. Each pass was dev build --upscaler dlss --no-prepare-shaders, run through the job queue in timing mode (nothing else building or playing), with LONGSHOT_NGX_SDK set and no LONGSHOT_SL_SDK.
  • Cache states: the cold build starts with empty cache, store, work and game folders. The warm build is the same build again with nothing changed. The incremental build adds a comment line to gpu/vk/vk_dlssg.h.
  • Passes: arms interleaved, 3 pairs of each kind after one pass per arm that is not counted, and 5 pairs of the renderer alone (dev compile --only renderer). Every pass's log says the Vulkan back end is built "with NVIDIA Streamline's DLSS Frame Generation" at 93884ed8b, and without it on main.
Median (range) Before: main @ 5468280d9 After: this PR @ 93884ed8b Change
Cold build, done.seconds 195.6 s (191.7–196.0) 194.6 s (192.9–200.1) −1.0 s, within the spread
Warm build, nothing changed 9.1 s (9.0–9.2) 9.1 s (9.1–9.3) none
Incremental, one line in vk_dlssg.h 16.4 s (16.0–18.0), 11 units 16.7 s (16.4–17.4), 12 units +0.3 s, within the spread
Renderer alone, cold, 272 units 38.7 s (36.4–42.5) 38.3 s (37.0–41.0) −0.4 s, within the spread
vk_dlssg.cpp's compile (cold build) 1.8 s 3.3 s +1.5 s
vk_dlssg_layer.cpp's compile (cold build) 1.9 s 3.9 s +2.0 s
longshot_vk.dll 18,248,704 bytes 18,360,832 bytes +112,128 bytes (+0.6 %)
Game folder 1,646,572,432 bytes, 51 files 1,646,684,560 bytes, 51 files +112,128 bytes, the same files
Downloaded nothing nothing none
  • Time. The two Streamline units take about 3.5 s more of compiler time. A build runs them in parallel with the others, off its critical path, so no build kind's time changes beyond its spread.
  • Incremental builds. A change to vk_dlssg.h recompiles one more unit here, vk_dlssg_layer.cpp, which includes that header when it is built with Streamline.
  • Size. longshot_vk.dll is the only file whose size changes, the same in every pass. The record lists the same 48 files on both sides, and there is no sl.* or LICENSE-NVIDIA-* file.
  • Downloads. The builder's cache, empty before each cold build, is still empty after every build on both sides.
  • Nothing to measure in the game. In the game without Streamline's runtime, the layer returns before doing anything. With the runtime, how DLSS FG runs through Streamline is the renderer's, and it was measured where it was added.
  • On main @ 6f5f99fce, after the rebases. The numbers hold for what they compare, this change against its base. Of the commits main took since 5468280d9, four touch a file of the layer's compile (build-compile, packages.rs, vk_dlssg*, tools.lock, third_party/) or of the downloads (runtimes.rs, build.rs, fetch.py, sl_sdk.py), and none changes either: #2782 the exe's icon resources in build-compile/src/lib.rs, #2799 the formatting of a build-compile test, #2765 the profile build.rs hands to the shader preparation (which these builds skip: --no-prepare-shaders), #2794 the language build.rs puts in the settings at the build's end. packages.rs, vk_dlssg*, tools.lock, third_party/, runtimes.rs, fetch.py and sl_sdk.py are as at 5468280d9. The two commits that make the compile are unchanged in git range-diff, and this head's later commits change only a comment in vk_dlssg.cpp and a docstring in sl_sdk.py there. The difference was not measured again on the new main, whose own changes may have moved both sides' times.

Risks

  • Every Windows build with DLSS now compiles vk_dlssg.cpp and vk_dlssg_layer.cpp for real, not as stubs: a
    compile error there would stop such a build. CI's vulkan-dlss job compiles the same files from the tree.
  • Every Windows build with DLSS now loads an sl.interposer.dll found beside longshot.exe when it has a valid NVIDIA
    signature (the layer checks it before loading), where only a developer's LONGSHOT_SL_SDK build did: one a player put
    there by hand, or scripts/fetch.py streamline --game, now runs. Without one, nothing of Streamline runs.
  • 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 profile 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.
  • A launcher of today writes no receipt and passes no --streamline: 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 build --profile <it> --streamline off. 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. On main @ 6f5f99fce.
  • 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. The build's time and size at
    93884ed8b against its base, main @ 5468280d9, with the same cache states (BeanBot's L1): no change in time beyond the
    spread, longshot_vk.dll 112,128 bytes larger, nothing downloaded (Measurements).
    On main @ 6f5f99fce they hold; Measurements says why.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.
    No existing part of third_party/ changes; one part is added, third_party/streamline, an unmodified upstream copy
    (MIT) with its PROVENANCE.md and tree-sha256, as a maintainer asked.

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 at this head, and on Linux in the CI's checks image at
    93884ed8b (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 DLSS Frame Generation through NVIDIA Streamline is compiled into a player's game only when a developer points `LONGSHOT_SL_SDK` at Streamline's SDK, and no build puts Streamline's runtime beside the game, so no player has it. This brings it to players in one pull request: every Windows build with DLSS compiles the Streamline layer from Streamline's MIT headers, now in the repository, and the builder puts Streamline's runtime beside the game for a player who chose it and accepted NVIDIA's licenses for it, and for no one else. - **The headers, in the repository** (first commit). `third_party/streamline` holds Streamline 2.14.16's MIT `license.txt` and the 13 headers DLSS FG through Streamline compiles with: the six `gpu/vk/vk_dlssg.cpp` includes and the seven they include in turn (`vk_dlssg_layer.cpp` is built with the same flags and includes none), unmodified but for LF, with their `PROVENANCE.md`: the release tag's commit, the upstream blob ids, the license reading and the `tree-sha256` that `scripts/check_third_party.py` checks. Eleven headers carry the MIT notice; `sl_appidentity.h` and `sl_device_wrappers.h` carry none (as upstream, on main too) and come under `license.txt`, whose one exception names `sl_nvperf.h`/`.dll`, which are not taken. Nothing else of NVIDIA's is in the repository: no DLL, no zip, no other license, no other header. CONTRIBUTING says so beside XeSS's headers. - **The compile** (second commit). `packages::sl_sdk` takes a developer's `LONGSHOT_SL_SDK` first, as before (with a wrong one the build goes without Streamline and a note says why; the tree's never takes its place), else the tree's `third_party/streamline` for a Windows build with DLSS, as XeSS's headers are taken. Nothing is downloaded for the compile. Without Streamline's runtime beside `longshot.exe`, `dlssg_load` returns before doing anything, so the game runs as a build without Streamline. CI's `vulkan-dlss` job compiles from the tree, with no SDK step. - **Who gets the runtime** (third commit). A Windows build with DLSS of a profile that takes Streamline: the profile's choice, `profile.json`'s `"streamline": true`, and its receipt, `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. `build --profile <id | dir> --streamline on|off` writes the choice, as `--prepare-shaders` writes its own: `true` written, the key taken out when off (so a profile never chosen keeps its bytes), any other value makes the profile unreadable, said. `play`, `build` (the launcher's Rebuild), `verify --repair` and `info` read it from the profile, whether `--profile` is a launcher's ID or a folder, so a Rebuild or a repair keeps the runtime its play put, and `info`'s fast check agrees with play's. `launcher-instance.json` carries no Streamline. Since #2791, an installed version's `version.json` selects its upscalers, so whether the build has DLSS is the version's; the choice and its receipt stay the profile's, as the licenses do (a test pins the two together). Not on Linux (Streamline has no Linux runtime), not with a developer's `LONGSHOT_SL_SDK` (its runtime is the developer's to put there). - **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. - **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. `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 `tar` that fails): one `streamline_skipped` warning, and the build goes on with DLSS as without Streamline. A play of the profile updates the game folder to try again (`RebuildReason::Streamline`) when the cache's mark of the last try says it is time (`<cache>/runtimes/sl-runtime-<pin's first 12>.tried`): 10 minutes after a download that failed or a first `tar` that failed on the pinned zip (a full disk, a file held); never at a play after files that are not the pinned ones, with no `tar` at all, or after a `tar` that failed twice (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 a change of the profile, 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: Streamline's MIT headers and their license are in the repository, as FSR's and XeSS's are, and nothing else of NVIDIA's enters it (its runtime comes from NVIDIA's release on each PC, after the player's consent); the launcher embeds the texts of the licenses the player accepts, as it does DLSS's (LongshotLauncher's side). This pull request now also carries the runtime step, formerly #2749. The choice is the profile's, written by `build --streamline`, as the owner decided over a field of `launcher-instance.json` (which the launcher of #2762's protocol 2 no longer writes) or a flag on every command. Read first: `third_party/streamline/PROVENANCE.md`, `packages.rs` (`sl_sdk`), then `runtimes.rs` (`takes_streamline`, `sl_runtime`, `sl_runtime_cached`, `unzip`), `play.rs` in `build-driver` (`streamline_wanted`, `key`, `rebuild_reason`, `Profile::read` and `synced` for `"streamline"`), `build.rs` (the removal, the record), and in `longshot-builder` `main.rs` (`--streamline`), `play.rs` (`Settings.streamline`, `profile_for`) and `info.rs`. `tests/test_sl_sdk.py` checks the tree's files are the release's (with CRLF back, the SHA-256s `scripts/sl_sdk.py` pins), all under the MIT license, the whole include closure of what `gpu/` and `host/` include, and that the builder's runtime is the same release's files as the script's. Known limits, by design for now: - Nothing changes for a player until the launcher takes its part (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/344): it writes `licenses.streamline` at the pin once the player accepted NVIDIA's licenses, and passes `--streamline on|off` to `build --profile`, when `info`'s capabilities list `streamline`. A launcher of today writes neither, and `--accept-licenses` takes no `streamline`. - `--streamline on` on Linux, without DLSS or without the receipt writes the choice and puts nothing: the build says nothing of it (the key and the record are as without it). - Choosing Streamline or taking it back changes the profile's key, so the update says the profile changed (an upscaler change's line and message) where it is a download or a removal. - No switch is added (the check's "A switch added or changed" box does not apply): `LONGSHOT_CACHE` and `LONGSHOT_NO_PREPARE` in the tests are the builder's existing variables (its cache folder, and no shader preparation), read by the builder only, not renderer or host settings (`gpu/vk/switches.def` lists those), so they have no row there, and their defaults do not change. - `gpu/vk/vk_dlssg.h`'s first comment still says the layer is built in with `LONGSHOT_SL_SDK`: that header is a reviewed source of two guide screenshots (`docs/user/images/guide/manifest.json`), so it is left for a change that checks them again. - 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, without `LONGSHOT_SL_SDK`, every build, test and game run through the PC's job queue. The game runs and the Linux checks below ran at 93884ed8b, on `main` @ 5468280d9, before the rebases; the checks without the game ran again at this head (318b0dee2, on `main` @ 6f5f99fce), as **After the rebases** says. The game ran in fullscreen on a 2560x1440 120 Hz screen, with the sound off, `RX_VK_DLSS=1`, `RX_VK_DLSS_FG=1` and `RX_VK_FRAMEGEN_MULT=2`. Each run went to the title menu and was quit by the control pipe. - **The setup.** An installation made the way the launcher of #2762's protocol 2 makes one: `Longshot.exe` is 93884ed8b's `longshot-builder` and the cache is in `LONGSHOT_CACHE`. There is no `launcher-instance.json`. A profile folder was first built by `build --profile <dir> --game ... --upscaler dlss --accept-licenses nvidia`, then given `licenses.streamline` at the pin in its `profile.json`, as the launcher writes it. Everything below passes `--profile <dir>` (a folder, as protocol 2 does); reading by a launcher's ID is covered by the unit tests only. - **`build --profile <dir> ... --streamline on`** (a Rebuild that chooses it): - it wrote `"streamline": true` into `profile.json`; - it compiled from the tree (`the Vulkan back end: with NVIDIA Streamline's DLSS Frame Generation (NVIDIA Streamline's SDK in <checkout>\third_party/streamline)`); - it put the ten files there, and the record says `placed`, with the ten in its `files`; - they came from the cache, which held them from an earlier run: nothing was downloaded this time. `info --profile <dir>` then gave `up_to_date: true` and `build.streamline: placed`. - **`play --profile <dir>`.** The fast check said `up to date`. The game's log has, in order: - `vk: Streamline started for DLSS Frame Generation` - `vk: Streamline: DLSS Frame Generation ready (up to 2x)` - `vk: Streamline Reflex: on` - `vk: NVIDIA DLSS: NGX started` On quitting, it has `vk: Streamline shut down for the exit (result 0)`, and the game exited with code 0 (BeanBot's L3). - **`verify --repair --profile <dir>`, with `sl.common.dll` deleted from the game folder.** It said `repaired: sl.common.dll`, and the record stayed `placed` with the ten files. - **`build --profile <dir>` with no `--streamline`.** It took the profile's choice: an exit code of 0 in under a second, nothing compiled, downloaded or taken out, and the record still `placed`. - **`build --profile <dir> ... --streamline off`.** - The fast check said `the profile's game files, upscalers or Streamline choice changed`. - The update took the ten files out (`LICENSE-NVIDIA-DLSS-FG.txt, ... sl.reflex.dll removed`). - `streamline` is gone from the record, and the key is gone from `profile.json`; the receipt stays. - `info` then gave `up_to_date: true` and no `build.streamline`. - **`play` after that** (the layer compiled in, no runtime beside the game). The log has `vk: NVIDIA DLSS: NGX started` and `vk: DLSS Frame Gen (NGX): available, up to 1 made frames between two of the game's`, and no `vk: Streamline` line. The game exited with code 0. - **Earlier heads.** The runtime step's other cases ran on b11fe4536 (then #2749), whose download and placing code this head keeps; they were not run again here: - another `sl.interposer.dll` put there by hand: `kept`, and nothing downloaded; - offline: `streamline_skipped` and `skipped`, and the game ran with DLSS FG through NGX; - 11 minutes later and back online: the 276 MB zip downloaded, `placed`, and Streamline started in the game. - **The tests' own mutants**, at 93884ed8b. Each mutant was put back after its run. With the choice left out of `Profile::key_on` (its `k.text("streamline", ...)` line deleted), `the_profile_s_streamline_changes_the_key_only_when_wanted_and_one_left_out_is_tried_again` fails on Windows and on Linux. Without `info`'s installation upscalers (then `p.upscalers = ups;`, deleted), `info_by_a_launcher_s_id_takes_its_installation_s_upscalers_as_its_play_does` fails. Since the rebase that line is #2791's (`clone_from` of the version's upscalers), not this change's; the test still passes at this head. - **The build's time and size against `main`** (BeanBot's L1), on this PC through the job queue: as Measurements says. - **Linux**, 93884ed8b (its tree checked equal to the commit's) in the CI's checks image (`scripts/linux/checks.Dockerfile`, built locally, in WSL): - `cargo clippy --locked --workspace --all-targets -- -D warnings` passes; - `cargo test --locked -p build-compile -p build-driver -p longshot-builder` passes whole (188 tests in `build-driver`'s library); - `cargo fmt` there reports the same `host_sources_tests.rs` line. - **After the rebases**, at this head (318b0dee2) on `main` @ 6f5f99fce: - The last rebase met #2765 and #2794 in `play.rs`: `rebuild_reason` takes both #2765's profile and this change's Streamline flag, and `Profile::key` drops the language as #2794 does while keeping Streamline's pin when wanted. A new test, `a_play_weighs_streamline_left_out_and_the_profile_s_shaders_together`, passes at this head; [the rebase's comment](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2748#issuecomment-91273) says what it holds and how it fails without the resolution. - The rebase before it met #2791 in `info.rs` and `build.md`: `info` keeps #2791's upscalers (an installed version's `version.json` first) and takes the profile's Streamline choice and the launcher id's cache, as play does. `git range-diff` shows the first two commits unchanged and the third changed only there and in `profiles.md` (which says the same of a profile folder). - A new test, `an_installed_version_s_dlss_and_the_profile_s_streamline_choice_decide_streamline_together`, builds and repairs a profile by folder and by id with a `version.json` of DLSS and a profile of none, then the other way round: the version's upscalers are taken, the profile's choice kept, and Streamline is wanted only with the version's DLSS. With `profile_of`'s `p.upscalers = modules;` deleted, it fails (`[]` against `[Dlss]`); put back, it passes. - The Streamline retry's text had lost a line continuation, so the player read a run of spaces mid-sentence (a cold review found it). `the_update_s_text_has_one_space_between_its_words` fails at 686fcede8 for that and passes with the fix. - The builder of this head, in a scratch folder with a dummy package: `info --profile <dir> --output json` lists `streamline` in the builder's capabilities; `build --profile <dir> --streamline on` writes `"streamline": true`; `play --profile <dir>` runs the fast check and starts a build; `--streamline off` takes the key out (the builds then stop on the dummy package, as expected). The check with a `version.json` of FSR alone beside the builder (`info`'s `upscalers` `["fsr4"]`, the profile's staying `["dlss"]`) ran at the previous head and not again here. - **`cargo test --workspace --locked --no-fail-fast`**: 791 passed, 12 failed. The same 12 fail on an archive of `main` @ 6f5f99fce here (774 passed; listed below). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails, on `main` too: without `-D warnings` the workspace reports three warnings, the same three on `main`, at `build-compile/src/lib.rs:894` and `:901` (#2782) and `build-driver/src/folder.rs:737` (#2794); none is in this change's code. `cargo fmt --all --check` passes. - **`tests/run_all.py --changed origin/main`**: 809 passed, 42 failed, 53 skipped. All 42 fail on that archive too, run with `--exact`. `test_sampler_admission.py` (two concurrent sampler cases; nothing this change touches) is unstable here: its cases fail in a different mix on each run, with the same assertion. - `tests/test_sl_sdk.py` passes. <details><summary>The failures that also fail on <code>main</code> @ 6f5f99fce here, at this head</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_crt_options.py`, `test_dev_ab.py`, `test_dev_build.py`, `test_dev_migrate.py`, `test_dev_update.py`, `test_framegen_resources.py`, `test_game_menu_mouse_buttons.py`, `test_input_background.py`, `test_input_movie.py`, `test_job_queue.py`, `test_keyboard_menu_option.py`, `test_keyboard_option.py`, `test_linux_pressure.py`, `test_loaded_modules_drop.py`, `test_log_batch.py`, `test_log_levels.py`, `test_menu_keys.py`, `test_oot_menu_mouse.py`, `test_option_ids.py`, `test_parity_gates.py`, `test_perf_send.py`, `test_present_source_crop.py`, `test_program_cache_cleanup.py`, `test_program_cache_one_variant.py`, `test_run_all_mingw.py`, `test_sampler_admission.py`, `test_screensaver.py`, `test_switch_table.py`, `test_text_keyboard_policy.py`, `test_upscaler_round_trip.py`, `test_vcore_video_acquire.py`, `test_video_catchup.py`, `test_video_hold_early.py`, `test_video_input_limit.py`, `test_windows_display_startup.py`, `test_windows_on_linux.py`. `cargo test --workspace`: `an_unchanged_rebuild_compiles_nothing_and_a_change_compiles_what_it_touches`, `doctor::tests::no_gpu_reads_as_the_game_s_header_does`, `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`, `tests::a_build_for_a_profile_writes_profile_json_and_its_settings`, `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** (`@Beanstalk`, not sent: a maintainer's call, BeanBot's L2): - a build with DLSS without Streamline's runtime, expecting the same log as `main` (no `vk: Streamline` line); - a profile with Streamline, expecting `vk: Streamline: ... DLSS Frame Generation does not go through it in this run` and the game's own frame generation. - **Windows, RTX 50:** a profile with Streamline, expecting `vk: Streamline started for DLSS Frame Generation` (`@Beanstalk`, not sent). - **Windows, a non-NVIDIA Tier 1 GPU:** a build with DLSS, expecting the game as on `main` (`@Beanstalk`, not sent). - **Linux, NVIDIA:** a build with DLSS of a profile with `"streamline": true`, expecting no Streamline download and the game as on `main` (by hand or `@Beanstalk`, not sent). ## Measurements No switch is added or changed: `LONGSHOT_CACHE` and `LONGSHOT_NO_PREPARE`, which the new tests set, are the builder's existing variables, and they ship at the defaults they have on `main`. **Verdict:** no build is slower beyond the spread; `longshot_vk.dll` is 112,128 bytes (0.6 %) larger, and nothing is downloaded. **The build's time and size, this change at 93884ed8b against `main` @ 5468280d9, its base** (BeanBot's L1). Windows 11, i9-13900K (31 compile workers), 64 GB, NVMe, NVIDIA 621.24, 2026-11-29. - How: two clean clones, each with its own `longshot-builder` compiled from its tree. Each pass was `dev build --upscaler dlss --no-prepare-shaders`, run through the job queue in `timing` mode (nothing else building or playing), with `LONGSHOT_NGX_SDK` set and no `LONGSHOT_SL_SDK`. - Cache states: the cold build starts with empty cache, store, work and game folders. The warm build is the same build again with nothing changed. The incremental build adds a comment line to `gpu/vk/vk_dlssg.h`. - Passes: arms interleaved, 3 pairs of each kind after one pass per arm that is not counted, and 5 pairs of the renderer alone (`dev compile --only renderer`). Every pass's log says the Vulkan back end is built "with NVIDIA Streamline's DLSS Frame Generation" at 93884ed8b, and without it on `main`. | Median (range) | Before: main @ 5468280d9 | After: this PR @ 93884ed8b | Change | |---|---|---|---| | Cold build, `done.seconds` | 195.6 s (191.7–196.0) | 194.6 s (192.9–200.1) | −1.0 s, within the spread | | Warm build, nothing changed | 9.1 s (9.0–9.2) | 9.1 s (9.1–9.3) | none | | Incremental, one line in `vk_dlssg.h` | 16.4 s (16.0–18.0), 11 units | 16.7 s (16.4–17.4), 12 units | +0.3 s, within the spread | | Renderer alone, cold, 272 units | 38.7 s (36.4–42.5) | 38.3 s (37.0–41.0) | −0.4 s, within the spread | | `vk_dlssg.cpp`'s compile (cold build) | 1.8 s | 3.3 s | +1.5 s | | `vk_dlssg_layer.cpp`'s compile (cold build) | 1.9 s | 3.9 s | +2.0 s | | `longshot_vk.dll` | 18,248,704 bytes | 18,360,832 bytes | +112,128 bytes (+0.6 %) | | Game folder | 1,646,572,432 bytes, 51 files | 1,646,684,560 bytes, 51 files | +112,128 bytes, the same files | | Downloaded | nothing | nothing | none | - **Time.** The two Streamline units take about 3.5 s more of compiler time. A build runs them in parallel with the others, off its critical path, so no build kind's time changes beyond its spread. - **Incremental builds.** A change to `vk_dlssg.h` recompiles one more unit here, `vk_dlssg_layer.cpp`, which includes that header when it is built with Streamline. - **Size.** `longshot_vk.dll` is the only file whose size changes, the same in every pass. The record lists the same 48 files on both sides, and there is no `sl.*` or `LICENSE-NVIDIA-*` file. - **Downloads.** The builder's cache, empty before each cold build, is still empty after every build on both sides. - **Nothing to measure in the game.** In the game without Streamline's runtime, the layer returns before doing anything. With the runtime, how DLSS FG runs through Streamline is the renderer's, and it was measured where it was added. - **On `main` @ 6f5f99fce, after the rebases.** The numbers hold for what they compare, this change against its base. Of the commits `main` took since 5468280d9, four touch a file of the layer's compile (`build-compile`, `packages.rs`, `vk_dlssg*`, `tools.lock`, `third_party/`) or of the downloads (`runtimes.rs`, `build.rs`, `fetch.py`, `sl_sdk.py`), and none changes either: #2782 the exe's icon resources in `build-compile/src/lib.rs`, #2799 the formatting of a `build-compile` test, #2765 the profile `build.rs` hands to the shader preparation (which these builds skip: `--no-prepare-shaders`), #2794 the language `build.rs` puts in the settings at the build's end. `packages.rs`, `vk_dlssg*`, `tools.lock`, `third_party/`, `runtimes.rs`, `fetch.py` and `sl_sdk.py` are as at 5468280d9. The two commits that make the compile are unchanged in `git range-diff`, and this head's later commits change only a comment in `vk_dlssg.cpp` and a docstring in `sl_sdk.py` there. The difference was not measured again on the new `main`, whose own changes may have moved both sides' times. ## Risks - Every Windows build with DLSS now compiles `vk_dlssg.cpp` and `vk_dlssg_layer.cpp` for real, not as stubs: a compile error there would stop such a build. CI's `vulkan-dlss` job compiles the same files from the tree. - Every Windows build with DLSS now loads an `sl.interposer.dll` found beside `longshot.exe` when it has a valid NVIDIA signature (the layer checks it before loading), where only a developer's `LONGSHOT_SL_SDK` build did: one a player put there by hand, or `scripts/fetch.py streamline --game`, now runs. Without one, nothing of Streamline runs. - 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 profile 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. - A launcher of today writes no receipt and passes no `--streamline`: 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 `build --profile <it> --streamline off`. 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. On `main` @ 6f5f99fce. - [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. The build's time and size at 93884ed8b against its base, `main` @ 5468280d9, with the same cache states (BeanBot's L1): no change in time beyond the spread, `longshot_vk.dll` 112,128 bytes larger, nothing downloaded (Measurements). On `main` @ 6f5f99fce they hold; Measurements says why. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. No existing part of `third_party/` changes; one part is added, `third_party/streamline`, an unmodified upstream copy (MIT) with its `PROVENANCE.md` and `tree-sha256`, as a maintainer asked. ### 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 at this head, and on Linux in the CI's checks image at 93884ed8b (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]>
Author
Contributor

Tested in game: Windows 11, RTX 4090, NVIDIA 621.24, fullscreen 2560x1440 at 120 Hz, a pack of this head (5460db724) on main's shared base, to the title menu with DLSS and DLSS FG 2x: vk: NVIDIA DLSS: NGX started, DLSS FG through NGX as on main, no vk: Streamline line, no sl.* file in the game folder, a clean quit.

Tested in game: Windows 11, RTX 4090, NVIDIA 621.24, fullscreen 2560x1440 at 120 Hz, a pack of this head (5460db724) on main's shared base, to the title menu with DLSS and DLSS FG 2x: vk: NVIDIA DLSS: NGX started, DLSS FG through NGX as on main, no vk: Streamline line, no sl.* file in the game folder, a clean quit.
Member

Possibly related, for context:

  • PR #2738 feat(vk): the menu says when NVIDIA Streamline makes DLSS FG's frames, and when the Upscaler keeps it out — Open Streamline menu changes; possible stack/overlap, but description does not claim dependency.
  • issue #1350 Idea: Streamline DLSS. — Original request for Streamline DLSS frame-generation support; this builder change enables player builds.
  • PR #2456 feat(vk): DLSS Frame Generation through NVIDIA Streamline, at an even pace — Merged implementation of Streamline DLSS FG; this PR supplies automatic MIT-header acquisition for player builds.
Possibly related, for context: - PR #2738 feat(vk): the menu says when NVIDIA Streamline makes DLSS FG's frames, and when the Upscaler keeps it out — Open Streamline menu changes; possible stack/overlap, but description does not claim dependency. - issue #1350 Idea: Streamline DLSS. — Original request for Streamline DLSS frame-generation support; this builder change enables player builds. - PR #2456 feat(vk): DLSS Frame Generation through NVIDIA Streamline, at an even pace — Merged implementation of Streamline DLSS FG; this PR supplies automatic MIT-header acquisition for player builds.
Author
Contributor

A correction to the "Tested in game" comment above: "DLSS FG through NGX as on main" was not compared with a run of main. What the log shows is vk: NVIDIA DLSS: NGX started and vk: DLSS Frame Gen (NGX): available, up to 1 made frames between two of the game's, with no vk: Streamline line, the same lines as this branch's first commit gave; Testing now says that.

A correction to the "Tested in game" comment above: "DLSS FG through NGX as on main" was not compared with a run of `main`. What the log shows is `vk: NVIDIA DLSS: NGX started` and `vk: DLSS Frame Gen (NGX): available, up to 1 made frames between two of the game's`, with no `vk: Streamline` line, the same lines as this branch's first commit gave; Testing now says that.
docs(builder): a change of Streamline's pin updates the builder's header table too
Some checks failed
PR description / Title and description (pull_request_target) Successful in 11s
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
069c61a4da
setup.md named scripts/sl_sdk.py and tests/test_sl_sdk.py only; runtimes.rs's SL_REPO and SL_HEADERS
must move with them, and the test checks they agree.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
@review
Owner

If the headers are MIT, we should include them like we do for FSR/etc

If the headers are MIT, we should include them like we do for FSR/etc
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The Windows build compiles the Streamline layer and the reported RTX 4090 run reaches the menu without its runtime, but the feature and its build and gameplay costs have not been compared with the base. The remaining hardware runs, the next step of the feature, and CI are still outstanding. Recommend approval; not approved on the forge.

Windows builds with DLSS fetch pinned MIT-licensed Streamline headers and compile the existing frame-generation layer. This prepares player builds for Streamline, at the cost of downloads, additional compilation and a larger renderer; the builder does not yet supply the runtime.

Testing before merging (3) (runs on the systems it can change; it doesn't hold the recommendation)

  • L1 builder/crates/build-driver/src/runtimes.rs:680: The added download and compilation work has no comparable base build measurement. (more on the line) Do: Compare clean and incremental Windows DLSS build time and output size on main and this head, with matching cache states and repeated runs.
  • L2 builder/crates/build-driver/src/build.rs:156: The compiled layer's inactive gameplay cost and behavior across the affected Windows hardware have not been compared with main. (more on the line) Do: Compare main and this head with the runtime absent on affected Windows hardware, including the outstanding RTX 20 or 30 run and a non-NVIDIA Tier 1 GPU; record frame times and normal gameplay behavior. (@fix does its part first: Skip inactive layer work before entering its state and per-frame checks.)
  • L3 builder/crates/build-driver/src/build.rs:156: The player-build path has not been shown working with the Streamline runtime it is intended to enable. (more on the line) Do: Run a Windows player build made from the fetched headers with the matching runtime installed, and verify Streamline frame generation and clean shutdown.

@fix can do L2.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • When will the runtime step be included? The repository standards say to group a track's steps into one pull request.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven: the author reports a 112 KB larger renderer and a successful Windows RTX 4090 menu run without Streamline's runtime. The reported 45 s and 38 s builds were not compared side by side with main, and a player build with the runtime has not been demonstrated.

Other systems: Windows DLSS builds compile the real layer even on non-NVIDIA GPUs and when the runtime is absent; its inactive calls and build cost need comparison with main. Linux does not fetch these headers, but the requested NVIDIA Linux build and game run remain outstanding. Existing developer SDK overrides retain precedence.

Switches: LONGSHOT_SL_SDK retains its unset default; when set it still overrides the fetched headers. No switch is added or removed.

Reviewed: 069c61a4da against 22d0d20098: Read the repository rules, PR template, commit messages and diff. Read the changed Rust and Python paths and relevant cache, compile and renderer paths; skimmed the changed documentation and recorded test results. Some long file output was truncated, so not every changed code file was read in full. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • The new header fetch is gated on Windows, DLSS and the absence of a developer Streamline SDK.
  • Downloaded files are pinned by SHA-256 and a failed header fetch leaves the build with DLSS.
  • The commits record AI assistance; no game-derived or generated files appear in the changed-file list.
  • The renderer API and shader sources are unchanged.

Testing: No commands that build, test or run project code were executed. The author reports Windows and Linux checks, an RTX 4090 game run without the Streamline runtime, and failures also reproduced on main; Forgejo CI is still running.

Overlaps and merge order: Unknown; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The Windows build compiles the Streamline layer and the reported RTX 4090 run reaches the menu without its runtime, but the feature and its build and gameplay costs have not been compared with the base. The remaining hardware runs, the next step of the feature, and CI are still outstanding. Recommend approval; not approved on the forge. Windows builds with DLSS fetch pinned MIT-licensed Streamline headers and compile the existing frame-generation layer. This prepares player builds for Streamline, at the cost of downloads, additional compilation and a larger renderer; the builder does not yet supply the runtime. **Testing before merging (3)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `builder/crates/build-driver/src/runtimes.rs:680`: The added download and compilation work has no comparable base build measurement. (more on the line) **Do:** Compare clean and incremental Windows DLSS build time and output size on main and this head, with matching cache states and repeated runs. - **L2** `builder/crates/build-driver/src/build.rs:156`: The compiled layer's inactive gameplay cost and behavior across the affected Windows hardware have not been compared with main. (more on the line) **Do:** Compare main and this head with the runtime absent on affected Windows hardware, including the outstanding RTX 20 or 30 run and a non-NVIDIA Tier 1 GPU; record frame times and normal gameplay behavior. *(`@fix` does its part first: Skip inactive layer work before entering its state and per-frame checks.)* - **L3** `builder/crates/build-driver/src/build.rs:156`: The player-build path has not been shown working with the Streamline runtime it is intended to enable. (more on the line) **Do:** Run a Windows player build made from the fetched headers with the matching runtime installed, and verify Streamline frame generation and clean shutdown. `@fix` can do L2. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - When will the runtime step be included? The repository standards say to group a track's steps into one pull request. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the author reports a 112 KB larger renderer and a successful Windows RTX 4090 menu run without Streamline's runtime. The reported 45 s and 38 s builds were not compared side by side with main, and a player build with the runtime has not been demonstrated. **Other systems:** Windows DLSS builds compile the real layer even on non-NVIDIA GPUs and when the runtime is absent; its inactive calls and build cost need comparison with main. Linux does not fetch these headers, but the requested NVIDIA Linux build and game run remain outstanding. Existing developer SDK overrides retain precedence. **Switches:** LONGSHOT_SL_SDK retains its unset default; when set it still overrides the fetched headers. No switch is added or removed. **Reviewed:** 069c61a4da35 against 22d0d20098d6: Read the repository rules, PR template, commit messages and diff. Read the changed Rust and Python paths and relevant cache, compile and renderer paths; skimmed the changed documentation and recorded test results. Some long file output was truncated, so not every changed code file was read in full. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - The new header fetch is gated on Windows, DLSS and the absence of a developer Streamline SDK. - Downloaded files are pinned by SHA-256 and a failed header fetch leaves the build with DLSS. - The commits record AI assistance; no game-derived or generated files appear in the changed-file list. - The renderer API and shader sources are unchanged. **Testing:** No commands that build, test or run project code were executed. The author reports Windows and Linux checks, an RTX 4090 game run without the Streamline runtime, and failures also reproduced on main; Forgejo CI is still running. **Overlaps and merge order:** Unknown; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -146,1 +153,4 @@
if upscalers.contains(&Upscaler::Dlss) {
if s.sl_sdk.is_none() {
s.sl_sdk = fetched_sl.map(Path::to_path_buf);
}
Member

L2 (should fix): The compiled layer's inactive gameplay cost and behavior across the affected Windows hardware have not been compared with main.

When: With no interposer DLL, the real layer still initializes state and its inactive checks replace stubs; the single RTX 4090 menu run has no base comparison, and Windows builds can also run on other GPUs.

Do: Compare main and this head with the runtime absent on affected Windows hardware, including the outstanding RTX 20 or 30 run and a non-NVIDIA Tier 1 GPU; record frame times and normal gameplay behavior.

**L2** (should fix): The compiled layer's inactive gameplay cost and behavior across the affected Windows hardware have not been compared with main. *When:* With no interposer DLL, the real layer still initializes state and its inactive checks replace stubs; the single RTX 4090 menu run has no base comparison, and Windows builds can also run on other GPUs. **Do:** Compare main and this head with the runtime absent on affected Windows hardware, including the outstanding RTX 20 or 30 run and a non-NVIDIA Tier 1 GPU; record frame times and normal gameplay behavior.
Member

L3 (should fix): The player-build path has not been shown working with the Streamline runtime it is intended to enable.

When: The reported run has no sl.interposer.dll, so it exercises the early return rather than frame generation through the newly compiled layer.

Do: Run a Windows player build made from the fetched headers with the matching runtime installed, and verify Streamline frame generation and clean shutdown.

**L3** (should fix): The player-build path has not been shown working with the Streamline runtime it is intended to enable. *When:* The reported run has no sl.interposer.dll, so it exercises the early return rather than frame generation through the newly compiled layer. **Do:** Run a Windows player build made from the fetched headers with the matching runtime installed, and verify Streamline frame generation and clean shutdown.
@ -572,6 +677,9 @@ pub fn fetch(
.collect();
take_or_keep(out, placed, &mut got);
}
if takes_sl_headers(upscalers, windows, own_sl_sdk) {
Member

L1 (should fix): The added download and compilation work has no comparable base build measurement.

When: A Windows DLSS build now fetches 14 files on a cold cache and compiles the real layer; the reported build times use different cache states and have no main baseline.

Do: Compare clean and incremental Windows DLSS build time and output size on main and this head, with matching cache states and repeated runs.

**L1** (should fix): The added download and compilation work has no comparable base build measurement. *When:* A Windows DLSS build now fetches 14 files on a cold cache and compiles the real layer; the reported build times use different cache states and have no main baseline. **Do:** Compare clean and incremental Windows DLSS build time and output size on main and this head, with matching cache states and repeated runs.
Jiro113 force-pushed feat/builder-streamline-headers from 069c61a4da
Some checks failed
PR description / Title and description (pull_request_target) Successful in 11s
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 93884ed8b1
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
2026-11-29 04:04:23 +00:00
Compare
Jiro113 changed title from WIP: feat(builder): Windows DLSS builds compile DLSS FG through Streamline from its MIT headers to WIP: feat(builder): DLSS FG through Streamline from its MIT headers, and its runtime for a profile that takes it 2026-11-29 04:04:45 +00:00
Author
Contributor

Reworked as one pull request, on main @ 5468280d9 (#2762's protocol 2 and #2773 included):

  • HumanBean's point. Streamline's MIT headers and their license.txt are now in the repository, in
    third_party/streamline (48fd0904f), as FSR's and XeSS's are. They come with a PROVENANCE.md and the
    tree-sha256 that scripts/check_third_party.py checks. Every Windows build with DLSS compiles the layer from them
    (9a8b14736), and nothing is downloaded for the compile. Nothing else of NVIDIA's enters the repository: no DLL, no zip,
    and no other license or header.
  • BeanBot's question on the runtime. The runtime step is now grouped here (93884ed8b); it was #2749, which I am
    closing. Streamline's runtime is still downloaded from NVIDIA's release on the player's PC, and only when:
    • the profile chose it (profile.json's "streamline": true);
    • its receipt says NVIDIA's licenses for it were accepted (licenses.streamline at the pin).
  • Where the choice lives. It is the profile's, as the owner decided. build --profile <id | dir> --streamline on|off
    writes it. play, build (the launcher's Rebuild), verify --repair and info read it from the profile, so a
    Rebuild or a repair keeps the runtime its play put there. launcher-instance.json carries no Streamline.
  • What the launcher has to do (MagicBeanDev/LongshotLauncher#344):
    • write licenses.streamline at the pin once the player accepts;
    • pass --streamline on|off to build --profile, when info's capabilities list streamline.
  • Testing. L3 is in Testing, at this head: a profile folder as protocol 2 makes one, with and without the runtime,
    through a Rebuild, a play, a repair and taking it back. L1 (the build against main with the same cache states)
    comes in a later run. L2 (the other GPUs) is for the Test Farm, when a maintainer decides to send it.
  • What's next. main has moved to 8efea5864 since these runs; this head merges with it without conflict. It stays
    WIP until L1 is here, and is rebased and run again before it leaves WIP.
Reworked as one pull request, on `main` @ 5468280d9 (#2762's protocol 2 and #2773 included): - **HumanBean's point.** Streamline's MIT headers and their `license.txt` are now in the repository, in `third_party/streamline` (48fd0904f), as FSR's and XeSS's are. They come with a `PROVENANCE.md` and the `tree-sha256` that `scripts/check_third_party.py` checks. Every Windows build with DLSS compiles the layer from them (9a8b14736), and nothing is downloaded for the compile. Nothing else of NVIDIA's enters the repository: no DLL, no zip, and no other license or header. - **BeanBot's question on the runtime.** The runtime step is now grouped here (93884ed8b); it was #2749, which I am closing. Streamline's runtime is still downloaded from NVIDIA's release on the player's PC, and only when: - the profile chose it (`profile.json`'s `"streamline": true`); - its receipt says NVIDIA's licenses for it were accepted (`licenses.streamline` at the pin). - **Where the choice lives.** It is the profile's, as the owner decided. `build --profile <id | dir> --streamline on|off` writes it. `play`, `build` (the launcher's Rebuild), `verify --repair` and `info` read it from the profile, so a Rebuild or a repair keeps the runtime its play put there. `launcher-instance.json` carries no Streamline. - **What the launcher has to do** (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/344): - write `licenses.streamline` at the pin once the player accepts; - pass `--streamline on|off` to `build --profile`, when `info`'s capabilities list `streamline`. - **Testing.** L3 is in Testing, at this head: a profile folder as protocol 2 makes one, with and without the runtime, through a Rebuild, a play, a repair and taking it back. L1 (the build against `main` with the same cache states) comes in a later run. L2 (the other GPUs) is for the Test Farm, when a maintainer decides to send it. - **What's next.** `main` has moved to 8efea5864 since these runs; this head merges with it without conflict. It stays WIP until L1 is here, and is rebased and run again before it leaves WIP.
Jiro113 force-pushed feat/builder-streamline-headers from 93884ed8b1
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
to eedb5d38b1
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
2026-11-29 10:24:46 +00:00
Compare
Author
Contributor

Rebased onto main @ 01d6878b3 (from 5468280d9): the head is now eedb5d38b, was 93884ed8b.

  • Conflict with #2791 (an installed version's version.json selects its upscalers), in longshot-builder/src/info.rs and docs/dev/reference/build.md. Resolved keeping both sides: the upscalers are the installed version's, as #2791 has them; the Streamline choice and its receipt stay the profile's. info takes the profile's choice and, for a launcher id, its installation's cache, as play does. The first two commits are unchanged in git range-diff. A new test builds and repairs a profile with a version.json of DLSS and a profile of none, then the other way round. Streamline is wanted only with the version's DLSS.
  • Also since 93884ed8b:
    • a fix with its test: the Streamline retry's text had lost a line continuation, so the player read a run of spaces;
    • a comment in vk_dlssg.cpp and a docstring in sl_sdk.py now say a profile takes Streamline, not an installation, and profiles.md says which cache a profile folder reads;
    • the header-include check now matches only sl.h and sl_*.h.
  • L1 (build time and size, 93884ed8b against its base 5468280d9, job queue, 3 interleaved pairs per kind): no build kind's time changes beyond its spread; longshot_vk.dll is 112,128 bytes larger; nothing is downloaded. The numbers still hold on 01d6878b3: no commit main took touches the layer's compile or the downloads (Measurements).
  • Tested at this head without the game: cargo test, clippy, run_all --changed origin/main, test_sl_sdk.py, and a quick run of the builder (info lists streamline; --streamline on|off writes and takes out the key). Every failure also fails on main @ 01d6878b3 here. The game runs are from 93884ed8b.
  • Left for the Test Farm (not sent, a maintainer's call): Windows RTX 20/30 and RTX 50 with and without the runtime, a non-NVIDIA Tier 1 GPU with DLSS, and Linux NVIDIA with "streamline": true, as Still to test says.
Rebased onto `main` @ 01d6878b3 (from 5468280d9): the head is now eedb5d38b, was 93884ed8b. - **Conflict with #2791** (an installed version's `version.json` selects its upscalers), in `longshot-builder/src/info.rs` and `docs/dev/reference/build.md`. Resolved keeping both sides: the upscalers are the installed version's, as #2791 has them; the Streamline choice and its receipt stay the profile's. `info` takes the profile's choice and, for a launcher id, its installation's cache, as play does. The first two commits are unchanged in `git range-diff`. A new test builds and repairs a profile with a `version.json` of DLSS and a profile of none, then the other way round. Streamline is wanted only with the version's DLSS. - **Also since 93884ed8b:** - a fix with its test: the Streamline retry's text had lost a line continuation, so the player read a run of spaces; - a comment in `vk_dlssg.cpp` and a docstring in `sl_sdk.py` now say a profile takes Streamline, not an installation, and `profiles.md` says which cache a profile folder reads; - the header-include check now matches only `sl.h` and `sl_*.h`. - **L1** (build time and size, 93884ed8b against its base 5468280d9, job queue, 3 interleaved pairs per kind): no build kind's time changes beyond its spread; `longshot_vk.dll` is 112,128 bytes larger; nothing is downloaded. The numbers still hold on 01d6878b3: no commit `main` took touches the layer's compile or the downloads (Measurements). - **Tested at this head without the game**: `cargo test`, clippy, `run_all --changed origin/main`, `test_sl_sdk.py`, and a quick run of the builder (`info` lists `streamline`; `--streamline on|off` writes and takes out the key). Every failure also fails on `main` @ 01d6878b3 here. The game runs are from 93884ed8b. - **Left for the Test Farm** (not sent, a maintainer's call): Windows RTX 20/30 and RTX 50 with and without the runtime, a non-NVIDIA Tier 1 GPU with DLSS, and Linux NVIDIA with `"streamline": true`, as Still to test says.
Jiro113 changed title from WIP: feat(builder): DLSS FG through Streamline from its MIT headers, and its runtime for a profile that takes it to feat(builder): DLSS FG through Streamline from its MIT headers, and its runtime for a profile that takes it 2026-11-29 10:25:26 +00:00
Jiro113 force-pushed feat/builder-streamline-headers from eedb5d38b1
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
to 318b0dee29
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 9s
2026-11-29 19:50:13 +00:00
Compare
Author
Contributor

Rebased onto main @ 6f5f99fce (from 01d6878b3): the head is now 318b0dee2, was eedb5d38b. The rebase was asked for on e4801d6a5; main took #2794, #2796, #2797 and #2799 while the tests ran, and #2794 conflicted again, so the branch went on to 6f5f99fce.

Conflicts, both in builder/crates/build-driver/src/play.rs, in the third commit (feat(builder): NVIDIA Streamline's runtime for a profile that takes it):

  • #2765 gave rebuild_reason the profile (profile: &Path), so the shaders' key is read with the played profile's settings (would_prepare(.., Some(profile), ..)); this branch gave it streamline: bool (retries_streamline). Resolved with both: rebuild_reason(now, folder, profile, prepare, streamline, get), called from check and ensure_built with profile and retries_streamline(p, &get). The order inside stays the branch's: a Streamline runtime left out of the last build is a reason before the shaders, so its update is a whole one (not shaders_only), which prepares the shaders too, with the profile #2765 passes in options_for. The three calls in this branch's Streamline test take &prof.
  • #2794 took the language out of Profile::key (the game reads game_language= from the settings at its start); this branch added Streamline's pin to the key when wanted. Resolved with both: the key is the copy, the upscalers and, only when wanted, Streamline's pin; no language. The doc comment says the same.

git range-diff against the old head: every commit identical except the third, which differs only in those two places, its doc comment, and profiles.md's language row (#2794's text, merged by git, with this branch's streamline row after it).

Test added (one new commit, test(builder): a play weighs Streamline left out and the profile's shaders together): play::tests::a_play_weighs_streamline_left_out_and_the_profile_s_shaders_together. In a game folder prepared for the profile, it holds that:

  • the check is current;
  • the played profile's settings.ini with hdr=2 / hdr_tone_mapper=1 makes it Shaders;
  • with the record's streamline at skipped it is Streamline when a retry is due, Shaders when not;
  • on Windows, ensure_built builds once for Streamline with shaders_only false, streamline true and the profile's absolute path.

With None in place of the profile in rebuild_reason's would_prepare call (as the branch read the shaders before #2765), it fails (left: None, right: Some(Shaders)); with the resolution it passes.

Tests, Windows 11, through the PC's job queue, at 318b0dee2 against an archive of main @ 6f5f99fce (and before at the e4801d6a5 rebase, the same results):

  • cargo test --workspace --locked --no-fail-fast: 791 passed, 12 failed. The same 12 fail on main @ 6f5f99fce here (774 passed): the ten listed in the description and link::tests::the_linker_s_list_is_parted_from_its_output and packages::tests::a_header_package_too_old_is_no_package, both in build-compile and both a ..\..\.. against a canonical path. The new test passes, with every Streamline test of the branch.
  • cargo clippy --workspace --all-targets --locked -- -D warnings fails on main too, at build-compile/src/lib.rs:894 and :901 (needless_borrows_for_generic_args, #2782). Without -D warnings the whole workspace reports three warnings, the same three on main: those two and build-driver/src/folder.rs:737 (#2794). None is in this change's code. cargo fmt --all --check passes.
  • tests/run_all.py --changed origin/main: 809 passed, 42 failed, 53 skipped. All 42 fail on the main archive too, run with --exact, with the same failure lines. The one exception is test_sampler_admission.py, whose concurrent cases fail in a different mix on each run with the same assertion (creates == 1 && live.size() == 1). That test was already unstable here before this rebase.
  • The builder of this head with a dummy package and a scratch profile: build --streamline on writes "streamline": true, info --output json lists streamline in the builder's capabilities, play runs the fast check and starts a build that stops on the dummy package, and build --streamline off takes the key out.
  • synthetic-game's end_to_end is Linux-only and did not run here.

BeanBot's L1 (measured on main @ 5468280d9): not measured again. Since 5468280d9, main changed nothing in the layer's compile or in the downloads. Four commits touch files on that list:

  • #2782: the exe's icon resources in build-compile/src/lib.rs;
  • #2799: the formatting of a build-compile test;
  • #2765: the profile build.rs hands to the shader preparation, which the measured builds skip (--no-prepare-shaders);
  • #2794: the language build.rs writes into the settings at the build's end.

packages.rs, vk_dlssg*, tools.lock, third_party/, runtimes.rs, fetch.py and sl_sdk.py are as they were at 5468280d9. Measurements says the same.

Description: Measurements' "after the rebase" paragraph and the Measured box name 6f5f99fce now; nothing else in it was changed. The CI on the new head waits for a maintainer (fork).

Rebased onto `main` @ 6f5f99fce (from 01d6878b3): the head is now 318b0dee2, was eedb5d38b. The rebase was asked for on e4801d6a5; `main` took #2794, #2796, #2797 and #2799 while the tests ran, and #2794 conflicted again, so the branch went on to 6f5f99fce. **Conflicts**, both in `builder/crates/build-driver/src/play.rs`, in the third commit (`feat(builder): NVIDIA Streamline's runtime for a profile that takes it`): - **#2765** gave `rebuild_reason` the profile (`profile: &Path`), so the shaders' key is read with the played profile's settings (`would_prepare(.., Some(profile), ..)`); this branch gave it `streamline: bool` (`retries_streamline`). Resolved with both: `rebuild_reason(now, folder, profile, prepare, streamline, get)`, called from `check` and `ensure_built` with `profile` and `retries_streamline(p, &get)`. The order inside stays the branch's: a Streamline runtime left out of the last build is a reason before the shaders, so its update is a whole one (not `shaders_only`), which prepares the shaders too, with the profile #2765 passes in `options_for`. The three calls in this branch's Streamline test take `&prof`. - **#2794** took the language out of `Profile::key` (the game reads `game_language=` from the settings at its start); this branch added Streamline's pin to the key when wanted. Resolved with both: the key is the copy, the upscalers and, only when wanted, Streamline's pin; no language. The doc comment says the same. `git range-diff` against the old head: every commit identical except the third, which differs only in those two places, its doc comment, and `profiles.md`'s `language` row (#2794's text, merged by git, with this branch's `streamline` row after it). **Test added** (one new commit, `test(builder): a play weighs Streamline left out and the profile's shaders together`): `play::tests::a_play_weighs_streamline_left_out_and_the_profile_s_shaders_together`. In a game folder prepared for the profile, it holds that: - the check is current; - the played profile's `settings.ini` with `hdr=2` / `hdr_tone_mapper=1` makes it `Shaders`; - with the record's `streamline` at `skipped` it is `Streamline` when a retry is due, `Shaders` when not; - on Windows, `ensure_built` builds once for `Streamline` with `shaders_only` false, `streamline` true and the profile's absolute path. With `None` in place of the profile in `rebuild_reason`'s `would_prepare` call (as the branch read the shaders before #2765), it fails (`left: None, right: Some(Shaders)`); with the resolution it passes. **Tests**, Windows 11, through the PC's job queue, at 318b0dee2 against an archive of `main` @ 6f5f99fce (and before at the e4801d6a5 rebase, the same results): - `cargo test --workspace --locked --no-fail-fast`: 791 passed, 12 failed. The same 12 fail on `main` @ 6f5f99fce here (774 passed): the ten listed in the description and `link::tests::the_linker_s_list_is_parted_from_its_output` and `packages::tests::a_header_package_too_old_is_no_package`, both in `build-compile` and both a `..\..\..` against a canonical path. The new test passes, with every Streamline test of the branch. - `cargo clippy --workspace --all-targets --locked -- -D warnings` fails on `main` too, at `build-compile/src/lib.rs:894` and `:901` (`needless_borrows_for_generic_args`, #2782). Without `-D warnings` the whole workspace reports three warnings, the same three on `main`: those two and `build-driver/src/folder.rs:737` (#2794). None is in this change's code. `cargo fmt --all --check` passes. - `tests/run_all.py --changed origin/main`: 809 passed, 42 failed, 53 skipped. All 42 fail on the `main` archive too, run with `--exact`, with the same failure lines. The one exception is `test_sampler_admission.py`, whose concurrent cases fail in a different mix on each run with the same assertion (`creates == 1 && live.size() == 1`). That test was already unstable here before this rebase. - The builder of this head with a dummy package and a scratch profile: `build --streamline on` writes `"streamline": true`, `info --output json` lists `streamline` in the builder's capabilities, `play` runs the fast check and starts a build that stops on the dummy package, and `build --streamline off` takes the key out. - `synthetic-game`'s `end_to_end` is Linux-only and did not run here. **BeanBot's L1** (measured on `main` @ 5468280d9): not measured again. Since 5468280d9, `main` changed nothing in the layer's compile or in the downloads. Four commits touch files on that list: - #2782: the exe's icon resources in `build-compile/src/lib.rs`; - #2799: the formatting of a `build-compile` test; - #2765: the profile `build.rs` hands to the shader preparation, which the measured builds skip (`--no-prepare-shaders`); - #2794: the language `build.rs` writes into the settings at the build's end. `packages.rs`, `vk_dlssg*`, `tools.lock`, `third_party/`, `runtimes.rs`, `fetch.py` and `sl_sdk.py` are as they were at 5468280d9. Measurements says the same. Description: Measurements' "after the rebase" paragraph and the Measured box name 6f5f99fce now; nothing else in it was changed. The CI on the new head waits for a maintainer (fork).
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The player build has started Streamline successfully on an RTX 4090, and the reported build-time comparison found no change beyond the run-to-run spread. The inactive layer’s gameplay cost and behavior across the affected Windows hardware still need comparison with main. Recommend approval; not approved on the forge.

Windows DLSS builds compile the Streamline layer from vendored MIT headers. For a profile whose player chose Streamline and accepted its licenses, the builder downloads and installs the pinned runtime; this adds runtime installation and retry logic and increases the renderer DLL by 112,128 bytes in the reported build.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 builder/crates/build-driver/src/build.rs:156: The compiled layer's inactive gameplay cost and behavior across the affected Windows hardware have not been compared with main. When: With no interposer DLL, the real layer still initializes state and its inactive checks replace stubs; the single RTX 4090 menu run has no base comparison, and Windows builds can also run on other GPUs. Do: Compare main and this head with the runtime absent on affected Windows hardware, including the outstanding RTX 20 or 30 run and a non-NVIDIA Tier 1 GPU; record frame times and normal gameplay behavior. (@fix does its part first: Skip inactive layer work before entering its state and per-frame checks.)

@fix can do L2.

Since the last review (on 069c61a4da)
Resolved: L1 (The added download and compilation work has no comparable base build measurement.); L3 (The player-build path has not been shown working with the Streamline runtime it is intende…)
Still open: L2 (The compiled layer's inactive gameplay cost and behavior across the affected Windows hardw…)

Checks: Still running: 10 checks.

Also noticed (2; not asked for, not blocking)
  • The launcher integration is needed before players can choose Streamline and provide its license receipt.
  • The recorded game runs precede the final rebases.
More: does it help, other systems, switches, what was read

Does it help: Yes for the demonstrated feature: the recorded RTX 4090 run started Streamline, reported DLSS Frame Generation ready up to 2x, and exited cleanly. The author reports three interleaved build pairs with no timing change beyond the spread and a 112,128-byte DLL increase; inactive gameplay cost remains unmeasured.

Other systems: The runtime path is Windows-only and requires DLSS, the profile choice and its license receipt. RTX 20/30, RTX 50, non-NVIDIA Windows hardware and Linux NVIDIA gameplay remain untested in the recorded runs.

Switches: The build command adds --streamline on|off; the profile defaults to off, with a separate license receipt required. LONGSHOT_SL_SDK retains precedence; no renderer switch default changes.

Reviewed: 318b0dee29 against 6f5f99fce9: Read AGENTS.md, CONTRIBUTING.md, Streamline provenance, the relevant runtime, profile, build and SDK selection sections, and portions of the diff. The full changed code, documentation, generated headers and remaining repository review rules were not read in full.; nothing run (a code review).

Checked and fine:

  • The profile requires both the choice and the pinned license receipt before requesting the runtime.
  • The runtime cache verifies the archive and extracted files against pinned hashes.
  • A build that no longer takes Streamline schedules builder-owned runtime files for removal.

Testing: No commands from the project were run. The author reports a successful RTX 4090 game run and head-level checks; CI is still running.

Overlaps and merge order: LongshotLauncher#344 supplies the player choice and license receipt; the feature has no launcher-facing path until that integration lands.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The player build has started Streamline successfully on an RTX 4090, and the reported build-time comparison found no change beyond the run-to-run spread. The inactive layer’s gameplay cost and behavior across the affected Windows hardware still need comparison with main. Recommend approval; not approved on the forge. Windows DLSS builds compile the Streamline layer from vendored MIT headers. For a profile whose player chose Streamline and accepted its licenses, the builder downloads and installs the pinned runtime; this adds runtime installation and retry logic and increases the renderer DLL by 112,128 bytes in the reported build. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `builder/crates/build-driver/src/build.rs:156`: The compiled layer's inactive gameplay cost and behavior across the affected Windows hardware have not been compared with main. *When:* With no interposer DLL, the real layer still initializes state and its inactive checks replace stubs; the single RTX 4090 menu run has no base comparison, and Windows builds can also run on other GPUs. **Do:** Compare main and this head with the runtime absent on affected Windows hardware, including the outstanding RTX 20 or 30 run and a non-NVIDIA Tier 1 GPU; record frame times and normal gameplay behavior. *(`@fix` does its part first: Skip inactive layer work before entering its state and per-frame checks.)* `@fix` can do L2. **Since the last review** (on 069c61a4da35) Resolved: L1 (The added download and compilation work has no comparable base build measurement.); L3 (The player-build path has not been shown working with the Streamline runtime it is intende…) Still open: L2 (The compiled layer's inactive gameplay cost and behavior across the affected Windows hardw…) **Checks:** Still running: 10 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The launcher integration is needed before players can choose Streamline and provide its license receipt. - The recorded game runs precede the final rebases. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the demonstrated feature: the recorded RTX 4090 run started Streamline, reported DLSS Frame Generation ready up to 2x, and exited cleanly. The author reports three interleaved build pairs with no timing change beyond the spread and a 112,128-byte DLL increase; inactive gameplay cost remains unmeasured. **Other systems:** The runtime path is Windows-only and requires DLSS, the profile choice and its license receipt. RTX 20/30, RTX 50, non-NVIDIA Windows hardware and Linux NVIDIA gameplay remain untested in the recorded runs. **Switches:** The build command adds --streamline on|off; the profile defaults to off, with a separate license receipt required. LONGSHOT_SL_SDK retains precedence; no renderer switch default changes. **Reviewed:** 318b0dee2918 against 6f5f99fce95f: Read AGENTS.md, CONTRIBUTING.md, Streamline provenance, the relevant runtime, profile, build and SDK selection sections, and portions of the diff. The full changed code, documentation, generated headers and remaining repository review rules were not read in full.; nothing run (a code review). **Checked and fine:** - The profile requires both the choice and the pinned license receipt before requesting the runtime. - The runtime cache verifies the archive and extracted files against pinned hashes. - A build that no longer takes Streamline schedules builder-owned runtime files for removal. **Testing:** No commands from the project were run. The author reports a successful RTX 4090 game run and head-level checks; CI is still running. **Overlaps and merge order:** LongshotLauncher#344 supplies the player choice and license receipt; the feature has no launcher-facing path until that integration lands. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch feat/builder-streamline-headers 2026-11-29 20:49:46 +00:00
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 9s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2748
No description provided.