fix(upscaler): fall back Series S mode 7 to TAA2 and auto-detect fsr/dlss dirs (#281) #444

Open
github-bot wants to merge 2 commits from github-bot/gh-444 into main AGit
Owner

@⁠ZerefDragnee1l on GitHub · 2026-12-06 00:58 UTC · original
ZerefDragnee1l:fix/series-s-upscaler-fallback-and-autodetect → main · +108 −15 · 4 files · 2 commits · open

Fixes #281 cleanly on current main (split out from #408).

Summary

  • Series S mode 7 -> TAA2 (6) fallback (apps/larp/src/hooks.rs, apps/larp/src/run.rs):
    • Extracted pure map_upscaler_mode(picked, caps, pc_upscaler_answers) helper used by upscaler_mode_picked().
    • When no PC upscaler (DLSS/FSR) is answering, a native Series S FidelityFX pick (7) falls back to TAA2 (6) so the console's un-translatable FSR4 shaders are not invoked. When a PC upscaler is answering and caps & 0x40 != 0, native pick 6 still maps to 7.
    • Adds upscaler_mode_pick_only when external upscalers are disabled/unavailable so frame_upscaler_pick_mode is still hooked for Series S safety.
  • FSR / DLSS directory auto-detection (crates/larp-gpu/src/ffx.rs, crates/larp-gpu/src/dlss.rs):
    • Auto-detects <exe>/bin/fsr, <exe>/fsr, <exe>/../../bin/fsr (and matching dlss / ngx directories) when env vars are unset so external upscalers work out-of-the-box without wrapper scripts.

Verification

  • git diff --check -> clean
  • cargo check -p larp -> exited 0
  • cargo test -p larp --bin larp map_upscaler_mode -> 1 passed; 0 failed; 15 filtered out (hooks::tests::map_upscaler_mode_handles_series_s_fallback_and_pc_upscaler)
**@⁠ZerefDragnee1l** on GitHub · 2026-12-06 00:58 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444) `ZerefDragnee1l:fix/series-s-upscaler-fallback-and-autodetect` → `main` · +108 −15 · 4 files · 2 commits · open Fixes #281 cleanly on current `main` (split out from #408). ### Summary - **Series S mode 7 -> TAA2 (6) fallback (`apps/larp/src/hooks.rs`, `apps/larp/src/run.rs`)**: - Extracted pure `map_upscaler_mode(picked, caps, pc_upscaler_answers)` helper used by `upscaler_mode_picked()`. - When no PC upscaler (DLSS/FSR) is answering, a native Series S FidelityFX pick (`7`) falls back to TAA2 (`6`) so the console's un-translatable FSR4 shaders are not invoked. When a PC upscaler is answering and `caps & 0x40 != 0`, native pick `6` still maps to `7`. - Adds `upscaler_mode_pick_only` when external upscalers are disabled/unavailable so `frame_upscaler_pick_mode` is still hooked for Series S safety. - **FSR / DLSS directory auto-detection (`crates/larp-gpu/src/ffx.rs`, `crates/larp-gpu/src/dlss.rs`)**: - Auto-detects `<exe>/bin/fsr`, `<exe>/fsr`, `<exe>/../../bin/fsr` (and matching `dlss` / `ngx` directories) when env vars are unset so external upscalers work out-of-the-box without wrapper scripts. ### Verification - `git diff --check` -> clean - `cargo check -p larp` -> exited 0 - `cargo test -p larp --bin larp map_upscaler_mode` -> `1 passed; 0 failed; 15 filtered out` (`hooks::tests::map_upscaler_mode_handles_series_s_fallback_and_pc_upscaler`)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 01:02:46 +00:00
Author
Owner

@⁠Heliumrich on GitHub · 2026-12-06 01:21 UTC · original · edited 2026-12-06 01:53 UTC

Kinda unrelated, but could you please make a PR to bypass the game TAA/FSR when the user is using DLSS/FSR/XeSS or whatever ?
As of right now, if you enable DLSS, you get two temporal anti-aliasing/upscaling passes, and it looks really bad, the game is way blurrier.

Disabling the game TAA (Series X) and using DLSS performance or quality, it looks way sharper, and there are no artifacts like checkerboard looking shadows or edges (this can happen when you disable a game TAA, look at r/FuckTAA on reddit. But here no, looks like DLSS/FSR handle the noise well and/or the game doesn't rely on TAA that much to denoise).
No graphical issues.

Yes, you can disable it manually, but I bet most users won't try and they will get a way worse experience without knowing

**@⁠Heliumrich** on GitHub · 2026-12-06 01:21 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444#issuecomment-7449122377) · edited 2026-12-06 01:53 UTC Kinda unrelated, but could you please make a PR to bypass the game TAA/FSR when the user is using DLSS/FSR/XeSS or whatever ? As of right now, if you enable DLSS, you get two temporal anti-aliasing/upscaling passes, and it looks really bad, the game is way blurrier. Disabling the game TAA (Series X) and using DLSS performance or quality, it looks way sharper, and there are no artifacts like checkerboard looking shadows or edges (this can happen when you disable a game TAA, look at r/FuckTAA on reddit. But here no, looks like DLSS/FSR handle the noise well and/or the game doesn't rely on TAA that much to denoise). No graphical issues. Yes, you can disable it manually, but I bet most users won't try and they will get a way worse experience without knowing
Author
Owner

@⁠vanya890 on GitHub · 2026-12-06 01:26 UTC · original

Could you add a focused regression test for the new Series S mode mapping: native pick 7 should become 6 when no PC upscaler answers, while a ready PC upscaler with the Series S capability bit should still map 6 to 7? The change in upscaler_mode_picked() is the critical correctness branch, and the current verification only reports cargo check; a pure test around the mapping would protect both directions without requiring a GPU.

**@⁠vanya890** on GitHub · 2026-12-06 01:26 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444#issuecomment-7449186129) Could you add a focused regression test for the new Series S mode mapping: native pick `7` should become `6` when no PC upscaler answers, while a ready PC upscaler with the Series S capability bit should still map `6` to `7`? The change in `upscaler_mode_picked()` is the critical correctness branch, and the current verification only reports `cargo check`; a pure test around the mapping would protect both directions without requiring a GPU.
Author
Owner

@⁠ZerefDragnee1l on GitHub · 2026-12-06 01:35 UTC · original

Added the focused unit test covering upscaler_mode_picked() via pure map_upscaler_mode(picked, caps, pc_upscaler_answers):

  • hooks::tests::map_upscaler_mode_handles_series_s_fallback_and_pc_upscaler:
    • Verifies native Series S pick 7 falls back to 6 when pc_upscaler_answers == false (with both caps = 0x40 and 0x00), while 6 stays 6.
    • Verifies ready PC upscaler (pc_upscaler_answers == true) maps 6 -> 7 when caps & 0x40 != 0, keeps 6 -> 6 without 0x40, keeps 7 -> 7, and leaves unrelated modes untouched.

Verified with cargo check -p larp (exited 0) and cargo test -p larp --bin larp map_upscaler_mode (1 passed; 0 failed; 15 filtered out).

**@⁠ZerefDragnee1l** on GitHub · 2026-12-06 01:35 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444#issuecomment-7449297841) Added the focused unit test covering `upscaler_mode_picked()` via pure `map_upscaler_mode(picked, caps, pc_upscaler_answers)`: - `hooks::tests::map_upscaler_mode_handles_series_s_fallback_and_pc_upscaler`: - Verifies native Series S pick `7` falls back to `6` when `pc_upscaler_answers == false` (with both `caps = 0x40` and `0x00`), while `6` stays `6`. - Verifies ready PC upscaler (`pc_upscaler_answers == true`) maps `6 -> 7` when `caps & 0x40 != 0`, keeps `6 -> 6` without `0x40`, keeps `7 -> 7`, and leaves unrelated modes untouched. Verified with `cargo check -p larp` (exited 0) and `cargo test -p larp --bin larp map_upscaler_mode` (`1 passed; 0 failed; 15 filtered out`).
Author
Owner

@⁠eipastel on GitHub · 2026-12-06 03:10 UTC · original

Tested this PR (e72ba3b) on an RTX 5060 8 GB (driver 621.01), Windows 11 build 26300, --console series-s, no upscaler configured (no LARP_UPSCALER, no dlss\/fsr\ beside the exe), street save, settings all default.

  • main 459db13: black window, luma mean 0.3/255 in all 4 samples over 60 s, 16-21 dispatches dropped per frame (dispatch: dropped, no host pipeline), the title's FSR 4 passes all fail DeserializeComputePipelineStateX.
  • This PR: the picture renders, luma mean 59.2-99.6 (sd 53-62) over 60 s, 0 dispatches dropped per frame in every report, amd_fidelityfx_upscaler_xbox.dll is not loaded and no FSR 4 deserialize failure is logged.

One run each, luma from a screen capture of the window every 15 s (no image kept). Details and logs in #81. I did not test the fsr/dlss folder auto-detection part of this PR.

Written with AI assistance (Claude Code).

**@⁠eipastel** on GitHub · 2026-12-06 03:10 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444#issuecomment-7450486304) Tested this PR (e72ba3b) on an RTX 5060 8 GB (driver 621.01), Windows 11 build 26300, `--console series-s`, no upscaler configured (no `LARP_UPSCALER`, no `dlss\`/`fsr\` beside the exe), street save, settings all default. - `main` 459db13: black window, luma mean 0.3/255 in all 4 samples over 60 s, 16-21 dispatches dropped per frame (`dispatch: dropped, no host pipeline`), the title's FSR 4 passes all fail `DeserializeComputePipelineStateX`. - This PR: the picture renders, luma mean 59.2-99.6 (sd 53-62) over 60 s, 0 dispatches dropped per frame in every report, `amd_fidelityfx_upscaler_xbox.dll` is not loaded and no FSR 4 deserialize failure is logged. One run each, luma from a screen capture of the window every 15 s (no image kept). Details and logs in https://git.gtahub.st/github/gamingwithhomie--larp/issues/81. I did not test the `fsr`/`dlss` folder auto-detection part of this PR. Written with AI assistance (Claude Code).
Author
Owner

@⁠ZerefDragnee1l on GitHub · 2026-12-06 03:52 UTC · original

Tested this PR (e72ba3b) on an RTX 5060 8 GB (driver 621.01), Windows 11 build 26300, --console series-s, no upscaler configured (no LARP_UPSCALER, no dlss\/fsr\ beside the exe), street save, settings all default.

  • main 459db13: black window, luma mean 0.3/255 in all 4 samples over 60 s, 16-21 dispatches dropped per frame (dispatch: dropped, no host pipeline), the title's FSR 4 passes all fail DeserializeComputePipelineStateX.
  • This PR: the picture renders, luma mean 59.2-99.6 (sd 53-62) over 60 s, 0 dispatches dropped per frame in every report, amd_fidelityfx_upscaler_xbox.dll is not loaded and no FSR 4 deserialize failure is logged.

One run each, luma from a screen capture of the window every 15 s (no image kept). Details and logs in #81 (comment). I did not test the fsr/dlss folder auto-detection part of this PR.

Written with AI assistance (Claude Code).

thanks for the feedback!

**@⁠ZerefDragnee1l** on GitHub · 2026-12-06 03:52 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444#issuecomment-7451060846) > Tested this PR ([e72ba3b](https://github.com/gamingwithhomie/larp/commit/e72ba3ba69380487c31c023961f5844bc9f0c4ad)) on an RTX 5060 8 GB (driver 621.01), Windows 11 build 26300, `--console series-s`, no upscaler configured (no `LARP_UPSCALER`, no `dlss\`/`fsr\` beside the exe), street save, settings all default. > > * `main` [459db13](https://github.com/gamingwithhomie/larp/commit/459db1396fe1703265add4bccf81753bbd016c0c): black window, luma mean 0.3/255 in all 4 samples over 60 s, 16-21 dispatches dropped per frame (`dispatch: dropped, no host pipeline`), the title's FSR 4 passes all fail `DeserializeComputePipelineStateX`. > * This PR: the picture renders, luma mean 59.2-99.6 (sd 53-62) over 60 s, 0 dispatches dropped per frame in every report, `amd_fidelityfx_upscaler_xbox.dll` is not loaded and no FSR 4 deserialize failure is logged. > > One run each, luma from a screen capture of the window every 15 s (no image kept). Details and logs in [#81 (comment)](https://git.gtahub.st/github/gamingwithhomie--larp/issues/81). I did not test the `fsr`/`dlss` folder auto-detection part of this PR. > > Written with AI assistance (Claude Code). thanks for the feedback!
Author
Owner

@⁠eipastel on GitHub · 2026-12-06 03:58 UTC · original

Tested the other half of this PR too, the dlss\ folder beside the exe. Same machine (RTX 5060, driver 621.01, Windows 11 build 26300), --console series-s, settings all default, LARP_UPSCALER and LARP_DLSS_PATH both unset, NVIDIA's signed nvngx_dlss.dll 310.9 in a dlss\ folder next to larp.exe:

  • main 459db13: DLSS not there: DLSS is not available (SuperSampling.Available Some(0), ...; model folder none: LARP_DLSS_PATH unset), then not used: neither DLSS, FSR nor DittoSR is there; black window (luma 0.3 in all 4 samples over 60 s).
  • This PR (e72ba3b): DLSS: NGX core ...\_nvngx.dll, model folder <exe folder>\dlss, preset M, then upscaler: the title made its FidelityFX context upscaler="DLSS" ... max_render=960x544 max_upscale=1920x1080; the picture renders (luma 58-74 over 60 s).

Not tested: the fsr\ folder (I have no AMD FidelityFX runtime DLL to put there). One run each.

Written with AI assistance (Claude Code).

**@⁠eipastel** on GitHub · 2026-12-06 03:58 UTC · [original](https://github.com/gamingwithhomie/larp/pull/444#issuecomment-7451133831) Tested the other half of this PR too, the `dlss\` folder beside the exe. Same machine (RTX 5060, driver 621.01, Windows 11 build 26300), `--console series-s`, settings all default, `LARP_UPSCALER` and `LARP_DLSS_PATH` both unset, NVIDIA's signed `nvngx_dlss.dll` 310.9 in a `dlss\` folder next to `larp.exe`: - `main` 459db13: `DLSS not there: DLSS is not available (SuperSampling.Available Some(0), ...; model folder none: LARP_DLSS_PATH unset)`, then `not used: neither DLSS, FSR nor DittoSR is there`; black window (luma 0.3 in all 4 samples over 60 s). - This PR (e72ba3b): `DLSS: NGX core ...\_nvngx.dll, model folder <exe folder>\dlss, preset M`, then `upscaler: the title made its FidelityFX context upscaler="DLSS" ... max_render=960x544 max_upscale=1920x1080`; the picture renders (luma 58-74 over 60 s). Not tested: the `fsr\` folder (I have no AMD FidelityFX runtime DLL to put there). One run each. Written with AI assistance (Claude Code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/444/head:github-bot/gh-444'
git switch 'github-bot/gh-444'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-444'
git switch 'github-bot/gh-444'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-444'
git switch 'github-bot/gh-444'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-444'
git switch 'main'
git merge --squash 'github-bot/gh-444'
git switch 'main'
git merge --ff-only 'github-bot/gh-444'
git switch 'main'
git merge 'github-bot/gh-444'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.