feat(linux): experimental RTX 30 DLSS Multi Frame Generation companion #2502

Open
Desekilibrio wants to merge 3 commits from Desekilibrio/Longshot:feat/linux-rtx30-dlss-mfg into main
First-time contributor

What

An opt-in Linux build option, --experimental-linux-dlssg-mfg, that lets NVIDIA RTX 30 (Ampere) cards use DLSS Frame Generation, which NVIDIA's runtime otherwise offers only on RTX 40/50.

  • Builds a small companion library (builder/linux/dlssg_unlocker.cpp) into the game folder and loads it automatically at start-up (the game relaunches itself with it preloaded).
  • The companion patches the known DLSS-G provider image in memory at load so an RTX 30 passes NGX's architecture check. Providers it does not recognise are left untouched.
  • Off by default. Builds without the flag are unchanged. Linux only. It uses the existing --fetch-ngx-sdk flow.
  • Adds three switches, LONGSHOT_DLSSG_UNLOCK, LONGSHOT_DLSSG_MFG_PROBE and LONGSHOT_DLSSG_AUTOLOADED.

Credit

Ported from Hookshot PR #3049 by VectorWpl. The two original commits are cherry-picked with -x, so the authorship is preserved. Adaptations here: names (LONGSHOT_*), the NGX helper API (scripts/fetch.py), and the Builder GUI checkbox is dropped because Longshot's Linux builder is now the Launcher.

Testing

  • Longshot [v3.2.0 / main] with these commits, built from source (clang 23.1.0, play profile applied), Nobara 44, NVIDIA RTX 3060 Laptop GPU (6 GB), driver 620.70.06, Intel 11th gen CPU.
  • Manual DLSS FG at 2x and 3x works.
  • With the automatic mode (FG enabled when the game cannot hold 60 fps) ghosting appears. This is expected at low base fps and not specific to the unlock.
  • The original author tested on an RTX 3090. Other RTX 30 models are untested.
  • tests/test_switch_table.py: [ok / result]. Not run after the rebase onto main: [full build / only the checks above].

Notes

This patches NVIDIA's provider in memory and redistributes nothing. The existing rule about not sharing a game folder built with NVIDIA's files applies. Happy to rename, move or drop anything if the team prefers a different shape, or to keep it out of the Launcher.

## What An opt-in Linux build option, `--experimental-linux-dlssg-mfg`, that lets NVIDIA RTX 30 (Ampere) cards use DLSS Frame Generation, which NVIDIA's runtime otherwise offers only on RTX 40/50. - Builds a small companion library (`builder/linux/dlssg_unlocker.cpp`) into the game folder and loads it automatically at start-up (the game relaunches itself with it preloaded). - The companion patches the known DLSS-G provider image in memory at load so an RTX 30 passes NGX's architecture check. Providers it does not recognise are left untouched. - Off by default. Builds without the flag are unchanged. Linux only. It uses the existing `--fetch-ngx-sdk` flow. - Adds three switches, `LONGSHOT_DLSSG_UNLOCK`, `LONGSHOT_DLSSG_MFG_PROBE` and `LONGSHOT_DLSSG_AUTOLOADED`. ## Credit Ported from Hookshot PR #3049 by VectorWpl. The two original commits are cherry-picked with `-x`, so the authorship is preserved. Adaptations here: names (`LONGSHOT_*`), the NGX helper API (`scripts/fetch.py`), and the Builder GUI checkbox is dropped because Longshot's Linux builder is now the Launcher. ## Testing - Longshot [v3.2.0 / main] with these commits, built from source (clang 23.1.0, play profile applied), Nobara 44, NVIDIA RTX 3060 Laptop GPU (6 GB), driver 620.70.06, Intel 11th gen CPU. - Manual DLSS FG at 2x and 3x works. - With the automatic mode (FG enabled when the game cannot hold 60 fps) ghosting appears. This is expected at low base fps and not specific to the unlock. - The original author tested on an RTX 3090. Other RTX 30 models are untested. - `tests/test_switch_table.py`: [ok / result]. Not run after the rebase onto main: [full build / only the checks above]. ## Notes This patches NVIDIA's provider in memory and redistributes nothing. The existing rule about not sharing a game folder built with NVIDIA's files applies. Happy to rename, move or drop anything if the team prefers a different shape, or to keep it out of the Launcher.
(cherry picked from commit becf4aed74376a5bd486b6feff58208d172e1e8e)
Main's switch table now covers HOOKSHOT_ names, and its env_on rule covers the relaunch marker's presence read: the companion is still set to 1 by the game itself, and env_on(1) is on, so the autoload, the unlock and the probe behave as before.

(cherry picked from commit fcaa8ce903a4e978c85d59deded1a465a190529f)
port: adapt the DLSS MFG companion to Longshot's names and NGX helper
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website builds (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website builds (pull_request) Blocked by required conditions
Website / Website preview, build (pull_request) Blocked by required conditions
Website / Website preview, upload (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Failing after 5s
bb2d8e44f0
Member

Possibly related, for context:

  • issue #184 Idea: dlssg for RTX30 Series GPU (Discord Idea) — Open request for DLSS FG/MFG on RTX 30
  • issue #1350 Idea: Streamline DLSS. — Open request for RTX 30 MFG unlock functionality
  • PR #2456 WIP: feat(vk): DLSS Frame Generation through NVIDIA Streamline, at an even pace — Open DLSS FG Streamline work; overlaps rendering/NGX frame-generation code
Possibly related, for context: - issue #184 Idea: dlssg for RTX30 Series GPU (Discord Idea) — Open request for DLSS FG/MFG on RTX 30 - issue #1350 Idea: Streamline DLSS. — Open request for RTX 30 MFG unlock functionality - PR #2456 WIP: feat(vk): DLSS Frame Generation through NVIDIA Streamline, at an even pace — Open DLSS FG Streamline work; overlaps rendering/NGX frame-generation code
First-time contributor

I see my work thanks to BeanBot, did not realize before creating my own PR #2532

Thanks @Desekilibrio I also included changes for rust builder and variable name changes there so this can be closed if you don't mind

I see my work thanks to BeanBot, did not realize before creating my own PR https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2532 Thanks @Desekilibrio I also included changes for rust builder and variable name changes there so this can be closed if you don't mind
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website builds (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website builds (pull_request) Blocked by required conditions
Website / Website preview, build (pull_request) Blocked by required conditions
Website / Website preview, upload (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Failing after 5s
This pull request has changes conflicting with the target branch.
  • gpu/vk/switches.def
  • host/hos_main.c
  • nx2/make_game.py
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/linux-rtx30-dlss-mfg:Desekilibrio-feat/linux-rtx30-dlss-mfg'
git switch 'Desekilibrio-feat/linux-rtx30-dlss-mfg'
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!2502
No description provided.