[FSR] Add support for FSR framegen and upscaling on AMD GPUs #1236

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

@⁠game6coder on GitHub · 2026-11-28 16:13 UTC · original
game6coder:rx9070xt → main · +688 −41 · 8 files · 2 commits · open

FSR upscaling and frame generation on AMD cards

On cards without DLSS, FSR 3 frame generation was always off: it needs a host upscaler, and only DLSS could fill that role.

What changed

  • FSR upscaling replaces DLSS (streamline/fsr_upscale.rs, new): loads amd_fidelityfx_upscaler_dx12.dll after checking its signature, picks the newest FSR 4 (falling back to 3.1), and records the title's FidelityFX upscale with the same inputs DLSS would get. One host context per title context, recreated when the size or flags change and released when the title destroys its context.
  • Hooked into streamline.rs: upscaling() / upscale() treat FSR like DLSS. VICTORY_FSR_UPSCALE = 1 (on) / auto (when DLSS is unavailable) / off. FSR 3 frame generation now runs with FSR upscaling instead of requiring DLSS.
  • Launcher (play.rs): the NVIDIA DLSS download is offered only on NVIDIA cards. On other cards, the F1 upscaler mode drives FSR. The FidelityFX folder search prefers a folder that holds all three DLLs, so a folder with only the frame-generation DLLs can't hide the upscaler.
  • UI and scripts: the F1 item is now "UPSCALER (DLSS OR FSR)" and the FG type reads "FSR 3 (AMD, RTX 20/30)". The startup notice shows "UPSCALING: AMD FSR". get-amd-fsr.ps1 also fetches the upscaler DLL (hash pinned). README updated.

Tested on an RX 9070 XT, 56 minutes of play: FSR 4.1.2 upscaling 1484×835 → 2560×1440 and FSR 3 frame generation (2×) were on the whole time, with 0 failed upscales or frame-generation prepares. cargo test passes.

**@⁠game6coder** on GitHub · 2026-11-28 16:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1236) `game6coder:rx9070xt` → `main` · +688 −41 · 8 files · 2 commits · open ### FSR upscaling and frame generation on AMD cards On cards without DLSS, FSR 3 frame generation was always off: it needs a host upscaler, and only DLSS could fill that role. **What changed** - **FSR upscaling replaces DLSS** (`streamline/fsr_upscale.rs`, new): loads `amd_fidelityfx_upscaler_dx12.dll` after checking its signature, picks the newest FSR 4 (falling back to 3.1), and records the title's FidelityFX upscale with the same inputs DLSS would get. One host context per title context, recreated when the size or flags change and released when the title destroys its context. - **Hooked into `streamline.rs`**: `upscaling()` / `upscale()` treat FSR like DLSS. `VICTORY_FSR_UPSCALE` = `1` (on) / `auto` (when DLSS is unavailable) / off. FSR 3 frame generation now runs with FSR upscaling instead of requiring DLSS. - **Launcher (`play.rs`)**: the NVIDIA DLSS download is offered only on NVIDIA cards. On other cards, the F1 upscaler mode drives FSR. The FidelityFX folder search prefers a folder that holds all three DLLs, so a folder with only the frame-generation DLLs can't hide the upscaler. - **UI and scripts**: the F1 item is now "UPSCALER (DLSS OR FSR)" and the FG type reads "FSR 3 (AMD, RTX 20/30)". The startup notice shows "UPSCALING: AMD FSR". `get-amd-fsr.ps1` also fetches the upscaler DLL (hash pinned). README updated. **Tested** on an RX 9070 XT, 56 minutes of play: FSR 4.1.2 upscaling 1484×835 → 2560×1440 and FSR 3 frame generation (2×) were on the whole time, with 0 failed upscales or frame-generation prepares. `cargo test` passes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 16:15:26 +00:00
github-bot changed title from [AMD] [FSR] Add support for FSR framegen and upscaling on AMD GPUs to [FSR] Add support for FSR framegen and upscaling on AMD GPUs 2026-11-28 21:37:42 +00:00
Author
Owner

@⁠saltdam36 on GitHub · 2026-11-29 07:42 UTC · original

Tested on an RX 7800XT, successfully upscaled from 1280x720 to 1920x1080 with no measurable performance impact.

Possibly causing untextured reflection maps (not raytraced) but unconfirmed.

**@⁠saltdam36** on GitHub · 2026-11-29 07:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1236#issuecomment-7252644372) Tested on an RX 7800XT, successfully upscaled from 1280x720 to 1920x1080 with no measurable performance impact. Possibly causing untextured reflection maps (not raytraced) but unconfirmed.
Author
Owner

@⁠lcastelanof on GitHub · 2026-11-29 15:16 UTC · original

Independent implementation + field report: AMD's signed upscaler for Series S below 720p (RX 7600 8 GB).

This complements #1236. We implemented the same idea locally, independently, on top of 829188e (uncommitted patch, no push), and took it further than a 720p-only path: with AMD's signed DLL, 960x540 and 640x360 are upscaled straight to 1920x1080 while FSR 3 FG 2x stays on.

How this differs from what is already in the threads:

  • #1153 (vibryxcx, 2026-11-28): VICTORY_FSR_WITHOUT_DLSS=1 + VICTORY_FSR_PATH=1 + VICTORY_DLSS_MODE=quality at 720p, using the title's own FSR4. That stays at 1280x720; ours routes the dispatch to AMD's signed upscaler below 720.
  • #2248 (RB-404): noted that the AMD upscaler SHA-256 should be added to get-amd-fsr.ps1. Our patch adds exactly that, for the Series S route.

What we changed locally (8 files, 397 insertions):

  • scripts/get-amd-fsr.ps1: fetch amd_fidelityfx_upscaler_dx12.dll with SHA256 AAD4FCCCCB29084A655F9A4F9F613BD22C8C03FB4A0F8840148CC6543B4CCACE (the _xbox DLL is rejected); ~85 MB instead of ~30 MB.
  • crates/victory-gpu/src/streamline/fsr.rs: load the DLL, FFX 2.4 create/dispatch structs, one upscale context per (render, output, flags), dispatch with the host's texture copies.
  • crates/victory-gpu/src/streamline.rs: skip the "FSR frame generation needs DLSS" gate when VICTORY_FSR_PATH=1, and expose amd_upscale_ready() / amd_upscale().
  • crates/victory-hle/src/modules/fidelityfx.rs: make the title's own context at the shipping sizes for VICTORY_FSR_PATH; below 720 replace the title's dispatch with AMD's.
  • apps/victory/src/run.rs: upscaler_mode() takes amd_upscale and keeps the requested scale when the signed upscaler is ready.
  • apps/victory/src/play.rs: F1 at 540/360 sets VICTORY_FSR_PATH=1 and the matching VICTORY_DLSS_MODE; keep S_RES even without NVIDIA files; require all three DLLs.
  • crates/victory-gpu/src/host/menu.rs: F1 label reads FSR and the help text says sizes other than 720 use FSR.
  • crates/victory-gpu/src/descriptor/host.rs: a separate experiment (negative result below), not needed for FSR.

The gate that matters: without the upscaler_mode() exception, a 540/360 request falls back to 1280x720. shipping_sizes then reports no clamp, the AMD branch in fidelityfx.rs never runs, and the title's own FSR4 (which only carries 720/1080 tables) divides by zero at the first upscale (0xc0000094). This is the difference between "540/360 works" and "crash at startup".

Config used: VICTORY_FSR_PATH=1, VICTORY_FSR_FRAMEGEN=1, VICTORY_MENU_FRAMEGEN=2, FG type fsr, VICTORY_CARD_BUFFERS_MIN_KB=64, texture room 90%, Series S profile, 1920x1080 output. VICTORY_MENU_DLSS is only the F1 label for the scale: no NVIDIA DLSS and no Lossless Scaling.

Hardware: RX 7600 8 GB (VRAM budget ~6.7 GB), Ryzen 5 4500 (6C/12T), Windows. Release build without diagnostics. cargo check --workspace --all-targets --locked clean; 915 tests pass.

Measured (indicative, not a controlled A/B: the game moves the player between runs):

  • 540p: frame median ~105-115 ms, ~8.5-9.3 fps, p95 ~215-240 ms. GPU ~61-66% busy and ~31-48 ms idle per frame; CPU prep ~72-78 ms; texture refresh ~11-17 ms; texture queue lock ~0.85-1.6 s per 5 s. No flicker, artifact, device lost or new crash.
  • 360p: stabilization median 72 ms / 15.2 fps, but the 30 s sample ranged 33-372 ms with FG toggling on and off; texture refresh rose to ~30 ms. Visually too soft for the small gain, so we went back to 540p.

Negative result worth recording: a local experiment that dropped stale slot-generation ops in QueueBatch::flush before taking the WRITE lock did not reduce lock acquisitions or wait (~55.6k takes and ~1.57 s per 5 s; the skip/take ratio went down). The ops are still current when flush reaches them. No FPS gain is claimed from it.

Remaining ceiling is host-side, not the upscaler: the card is idle about a third of every frame. On this 6C/12T CPU, a perfect-CPU floor at this scene would be ~15 fps real; 30 fps real would need roughly a 3x cut in host work plus some GPU work. #2371 (sleep instead of spinning on the FSR fence) looks relevant here.

Logs: victory-nvidia-play-20261129-130212-9252.log (540p baseline), ...133230-17160.log (DUE_INDEX), ...141055-15020.log (360p), ...141731-6432.log (540p restored). Can provide the full diff or logs if useful.

**@⁠lcastelanof** on GitHub · 2026-11-29 15:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1236#issuecomment-7257960333) Independent implementation + field report: AMD's signed upscaler for Series S **below 720p** (RX 7600 8 GB). This complements #1236. We implemented the same idea locally, independently, on top of `829188e` (uncommitted patch, no push), and took it further than a 720p-only path: with AMD's signed DLL, 960x540 and 640x360 are upscaled straight to 1920x1080 while FSR 3 FG 2x stays on. **How this differs from what is already in the threads:** - #1153 (vibryxcx, 2026-11-28): `VICTORY_FSR_WITHOUT_DLSS=1` + `VICTORY_FSR_PATH=1` + `VICTORY_DLSS_MODE=quality` at 720p, using the title's own FSR4. That stays at 1280x720; ours routes the dispatch to AMD's signed upscaler below 720. - #2248 (RB-404): noted that the AMD upscaler SHA-256 should be added to `get-amd-fsr.ps1`. Our patch adds exactly that, for the Series S route. **What we changed locally (8 files, 397 insertions):** - `scripts/get-amd-fsr.ps1`: fetch `amd_fidelityfx_upscaler_dx12.dll` with SHA256 `AAD4FCCCCB29084A655F9A4F9F613BD22C8C03FB4A0F8840148CC6543B4CCACE` (the `_xbox` DLL is rejected); ~85 MB instead of ~30 MB. - `crates/victory-gpu/src/streamline/fsr.rs`: load the DLL, FFX 2.4 create/dispatch structs, one upscale context per (render, output, flags), dispatch with the host's texture copies. - `crates/victory-gpu/src/streamline.rs`: skip the "FSR frame generation needs DLSS" gate when `VICTORY_FSR_PATH=1`, and expose `amd_upscale_ready()` / `amd_upscale()`. - `crates/victory-hle/src/modules/fidelityfx.rs`: make the title's own context at the shipping sizes for `VICTORY_FSR_PATH`; below 720 replace the title's dispatch with AMD's. - `apps/victory/src/run.rs`: `upscaler_mode()` takes `amd_upscale` and keeps the requested scale when the signed upscaler is ready. - `apps/victory/src/play.rs`: F1 at 540/360 sets `VICTORY_FSR_PATH=1` and the matching `VICTORY_DLSS_MODE`; keep `S_RES` even without NVIDIA files; require all three DLLs. - `crates/victory-gpu/src/host/menu.rs`: F1 label reads `FSR` and the help text says sizes other than 720 use FSR. - `crates/victory-gpu/src/descriptor/host.rs`: a separate experiment (negative result below), not needed for FSR. **The gate that matters:** without the `upscaler_mode()` exception, a 540/360 request falls back to 1280x720. `shipping_sizes` then reports no clamp, the AMD branch in `fidelityfx.rs` never runs, and the title's own FSR4 (which only carries 720/1080 tables) divides by zero at the first upscale (`0xc0000094`). This is the difference between "540/360 works" and "crash at startup". **Config used:** `VICTORY_FSR_PATH=1`, `VICTORY_FSR_FRAMEGEN=1`, `VICTORY_MENU_FRAMEGEN=2`, FG type `fsr`, `VICTORY_CARD_BUFFERS_MIN_KB=64`, texture room 90%, Series S profile, 1920x1080 output. `VICTORY_MENU_DLSS` is only the F1 label for the scale: no NVIDIA DLSS and no Lossless Scaling. **Hardware:** RX 7600 8 GB (VRAM budget ~6.7 GB), Ryzen 5 4500 (6C/12T), Windows. Release build without `diagnostics`. `cargo check --workspace --all-targets --locked` clean; 915 tests pass. **Measured (indicative, not a controlled A/B: the game moves the player between runs):** - 540p: frame median ~105-115 ms, ~8.5-9.3 fps, p95 ~215-240 ms. GPU ~61-66% busy and ~31-48 ms idle per frame; CPU prep ~72-78 ms; texture refresh ~11-17 ms; texture queue lock ~0.85-1.6 s per 5 s. No flicker, artifact, device lost or new crash. - 360p: stabilization median 72 ms / 15.2 fps, but the 30 s sample ranged 33-372 ms with FG toggling on and off; texture refresh rose to ~30 ms. Visually too soft for the small gain, so we went back to 540p. **Negative result worth recording:** a local experiment that dropped stale slot-generation ops in `QueueBatch::flush` before taking the `WRITE` lock did **not** reduce lock acquisitions or wait (~55.6k takes and ~1.57 s per 5 s; the skip/take ratio went down). The ops are still current when `flush` reaches them. No FPS gain is claimed from it. **Remaining ceiling is host-side, not the upscaler:** the card is idle about a third of every frame. On this 6C/12T CPU, a perfect-CPU floor at this scene would be ~15 fps real; 30 fps real would need roughly a 3x cut in host work plus some GPU work. #2371 (sleep instead of spinning on the FSR fence) looks relevant here. Logs: `victory-nvidia-play-20261129-130212-9252.log` (540p baseline), `...133230-17160.log` (DUE_INDEX), `...141055-15020.log` (360p), `...141731-6432.log` (540p restored). Can provide the full diff or logs if useful.
Author
Owner

@⁠ea0099 on GitHub · 2026-11-29 16:32 UTC · original

Field report from an RX 7800 XT (RDNA 3, 16 GB), Ryzen 5 7600X, 32 GB DDR5-6000, Windows.

To be clear: I didn't run this PR's branch. I ran a local build with the same approach (AMD's
signed amd_fidelityfx_upscaler_dx12.dll taking the title's FidelityFX upscale where DLSS would,
with FSR 3 frame generation on top), on 2026.11.28.01. So these numbers say what RDNA 3 does on
this path, not that this PR's code is verified:

  • Series X, 2560x1440, FSR Balanced + FSR 3 FG 2x: plays. F3 shows about 20 fps rendered and
    40 with frame generation, 45 ms/frame, about 5000 draws/frame. That's in line with the
    46-65 ms docs/findings.md measured on a 7900 XTX, where CPU-side submission is the limit.
  • Trying THIN off with ASYNC SUBMIT on made no difference to frame rate on this 6-core CPU.
  • On the first start of a new build, models and textures were missing until pipelines finished.
    After a restart, everything was there.
  • Series S (switched in F1) crashed within about 5 s of launch on that build, before
    Mode::on_console landed. I didn't collect logs for it, sorry. I haven't re-tested on
    2026.11.29.01.

Happy to run this branch on the 7800 XT once it's rebased onto current main, and report back
with logs.

**@⁠ea0099** on GitHub · 2026-11-29 16:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1236#issuecomment-7258987344) Field report from an **RX 7800 XT** (RDNA 3, 16 GB), Ryzen 5 7600X, 32 GB DDR5-6000, Windows. To be clear: I didn't run this PR's branch. I ran a local build with the same approach (AMD's signed `amd_fidelityfx_upscaler_dx12.dll` taking the title's FidelityFX upscale where DLSS would, with FSR 3 frame generation on top), on 2026.11.28.01. So these numbers say what RDNA 3 does on this path, not that this PR's code is verified: - **Series X, 2560x1440, FSR Balanced + FSR 3 FG 2x:** plays. F3 shows about 20 fps rendered and 40 with frame generation, 45 ms/frame, about 5000 draws/frame. That's in line with the 46-65 ms `docs/findings.md` measured on a 7900 XTX, where CPU-side submission is the limit. - Trying THIN off with ASYNC SUBMIT on made no difference to frame rate on this 6-core CPU. - On the first start of a new build, models and textures were missing until pipelines finished. After a restart, everything was there. - **Series S** (switched in F1) crashed within about 5 s of launch on that build, before `Mode::on_console` landed. I didn't collect logs for it, sorry. I haven't re-tested on 2026.11.29.01. Happy to run this branch on the 7800 XT once it's rebased onto current `main`, and report back with logs.
This pull request has changes conflicting with the target branch.
  • README.md
  • apps/victory/src/play.rs
  • apps/victory/src/run.rs
  • crates/victory-gpu/src/host/menu.rs
  • crates/victory-gpu/src/streamline.rs
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 origin '+refs/pull/1236/head:github-bot/gh-1236'
git switch 'github-bot/gh-1236'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1236'
git switch 'github-bot/gh-1236'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1236'
git switch 'github-bot/gh-1236'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1236'
git switch 'main'
git merge --squash 'github-bot/gh-1236'
git switch 'main'
git merge --ff-only 'github-bot/gh-1236'
git switch 'main'
git merge 'github-bot/gh-1236'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1236
No description provided.