Skip to content

FidelityFX: add opt-in AMD frame generation to host upscaling - #1917

Open
AwkGrep256 wants to merge 5 commits into
Marvisak:mainfrom
AwkGrep256:fidelityfx-framegen
Open

AwkGrep256 wants to merge 5 commits into
Marvisak:mainfrom
AwkGrep256:fidelityfx-framegen

Conversation

@AwkGrep256

@AwkGrep256 AwkGrep256 commented Nov 25, 2026 •

Copy link
Copy Markdown

Important

Add optional frame generation to the existing PC FSR path. main already upscales individual frames. This Windows D3D12 PR adds the FidelityFX proxy swap chain and feeds it depth and motion from the existing upscale so the host can generate intermediate frames.

✅ Verified on Windows: the proxy swap chain was created and presented at 4K. Still to verify: generated frames during gameplay, pacing, image quality, and overhead. The feature defaults off and can be tried with VICTORY_FIDELITYFX_FRAMEGEN=1.

This replaces the closed #1287 and can merge independently of the Series X switches in #1793. Passing Windows CI

Implementation

With VICTORY_FIDELITYFX_FRAMEGEN=1 and VICTORY_FIDELITYFX_DIR pointing to the SDK's Kits/FidelityFX/signedbin folder, the D3D12 presenter uses the FidelityFX proxy swap chain for RGBA8 output. The HLE upscale hands off depth, motion vectors, and frame constants after its command list is submitted. The presenter uses those inputs to prepare interpolation for the next present. The path uses the FSR 3 interpolation API, which takes the inputs available from the upscale. HUD-less color is unavailable, so the UI is included in interpolation.

Windows runtime verification

RX 9070 XT, Series X profile, FidelityFX SDK 2.4.0.

Check Result Evidence
Proxy swap chain creation Verified Swap-chain provider 4.0.0
Presentation setup Verified 3840 × 2160, RGBA8
Host upscaler context Verified FSR 4.1.2, 1920 × 1080 to 3840 × 2160
Generated frames in the world Unverified The run ended in the AMD shader compiler at amdxc64.dll+0x861b9f. The same crash was observed without FidelityFX.
Generated-frame pacing, image quality, and overhead Unverified Requires a run that confirms generated world frames.

The Series X runtime check used the opt-in upscaler and render-scale switches from #1793. This PR targets main directly and reuses whichever host upscaling calls the title makes.

Windows checks

All three checks passed locally on the PR head.

  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --workspace --locked (including the xtask asset-policy tests)

The title asks for no frame generation, and main's host FidelityFX module
refuses it. A diagnostics switch now generates frames on the host from
the title's upscale, as Marvisak#1287 did on its own FidelityFX path:

- With VICTORY_FIDELITYFX_FRAMEGEN=1 beside VICTORY_FIDELITYFX_DIR,
  amd_fidelityfx_framegeneration_dx12.dll is loaded from the same folder
  and the presenter's swap chain becomes its proxy (RGBA8 only).
- At each host upscale, the HLE module hands the upscale's depth, motion
  vectors and constants to victory_gpu::external::frame_generation_inputs;
  they feed the next present once the list has run (HostList::defer_after,
  so no change to submission or reset).
- Before each present the generator is configured and given those inputs
  in the presenter's copy list; the proxy inserts the generated frames
  during Present.

It uses the provider that works from depth and motion vectors (FSR 3
frame generation): frame generation 4 wants view matrices the upscale
does not carry. No HUD-less colour is given, so the UI is interpolated
with the scene.

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review only: gpu+hle Windows-only; source review of the diff.

FidelityFX opt-in AMD frame generation (README+gpu+hle): FOURTH FidelityFX PR (#1793/#1868/#1917…) — maintainer should pick one; AMD FG is a different feature than upscaling though.

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs work: needs the maintainer's decision. The new head (33c50dc) merges main and now merges cleanly. The host.rs conflict is gone. It adds d900d3c (framegen::version_three), which picks the built-in Frame Generation 3.x providers explicitly instead of the 4.0.2 default, which needs view matrices. The feature stays diagnostics-only and opt-in (VICTORY_FIDELITYFX_FRAMEGEN). It loads amd_fidelityfx_framegeneration_dx12.dll from VICTORY_FIDELITYFX_DIR, the same way main already loads the upscaler in modules/fidelityfx.rs.

About the earlier ask for generated presents: the author's logs (presents=6 for 3 rendered frames, proxy 3.1.7 / generator 3.1.6) come from ports of this code to two forks, run together with the title-patching switches from #1793. They are not from this head on main. A short log from this exact head would settle it.

Whether VIctory should carry host frame generation at all is still the maintainer's call. HUD text is interpolated with the scene, and the author notes it smears.

CI: passing (check).


Generated by Claude Code

@AwkGrep256

Copy link
Copy Markdown
Author

@Marvisak I verified generated frames in the title on an RX 9070 XT in Series X mode. The test used this PR's framegen code ported to the Belobug AMD fork, with explicit selection of the SDK's 3.x providers. The runtime-tested commit is e230ec2 on that fork port.

Check Verified in the test
Host upscale FSR 4.1.2, 2560×1440 → 3840×2160, SDK result 0.
Framegen proxy and generator Built-in 3.1.7 swap chain and 3.1.6 generator.
Inputs The first upscaled frame supplied depth and motion at 2560×1440.
Presented frames The logged sample counted 3 rendered + 3 generated = 6 presents.
Game FPS and input VIctory's counter reports rendered game FPS. The test verifies 2× presentation in the sample. Sustained pacing and input latency need a matched measurement.
FidelityFX frame generation: proxy swap chain provider="3.1.7"
FidelityFX: first successful host upscale result=0 render=[2560, 1440]
FidelityFX frame generation: generator for the upscaled frames provider="3.1.6" screen=[3840, 2160] render=[2560, 1440]
FidelityFX frame generation: first upscaled frame's depth and motion given to it frame=5401 render=[2560, 1440] screen=[3840, 2160]
FidelityFX frame generation: generated frames frame=5403 rendered=3 continuous=2 generated=3 presents=6 waited=0

The earlier run selected generator 4.0.2 by default, which requires view matrices the integration does not provide. The follow-up enumerates the SDK's built-in versions and passes explicit IDs for the two 3.x contexts. The provider-selection follow-up is in the AMD fork PR. This comment reports the tested port; the upstream head of #1917 is still ed89e4a. AMD fork PR · Series X FSR PR #1793

@AwkGrep256

Copy link
Copy Markdown
Author

@Marvisak, I’ve opened #2751 as a draft follow-up for AMD Frame Generation 4.0.2. A controlled Series X run captured camera orientation from the title’s velocity pass, and the RX 9070 XT reported the 4.0.2 generator and 4.0.0 proxy. The draft has the capture evidence and a checklist for verifying camera matching and generated presents in-game.

For #1917, the remaining runtime check is generated presents on its exact 3.x PR head. I’ll review the 4.0.2 results in #2751 as they come in.

@AwkGrep256

AwkGrep256 commented Nov 26, 2026 •

Copy link
Copy Markdown
Author

🚀 Tested on another fork: Frame Generation 3 doubles what's on screen

This PR's frame generation now runs on avatarmanz/VIctory-7900XTX: avatarmanz/VIctory-7900XTX#53.

FSR 1440p → 4K + Frame Generation 3
Rendered fps 20.0 19.9
On screen 20 ~40 ████████████████
  • ✅ Proxy swap chain 3.1.7, generator 3.1.6, presents=6 for 3 rendered frames.
  • 😌 It feels smoother in play. HUD text can smear, since the HUD is interpolated with the scene.
  • 🩹 That fork sends presents ahead on their own lists. Frame generation in one of those crashed after 4 minutes freeing objects. Presenting from the one present list, as here, fixed it.

RX 9070 XT, Ryzen 7 9800X3D, 32 GB, Series X profile, FidelityFX SDK 2.4.0.

📜 Log evidence

Our own log lines from the measured runs (click a mode):

C · FSR 1440p → 2160p: render 2560×1440 → 3840×2160 · 20.0 fps rendered

C-20261126-030546

2026-11-26T00:05:55 victory_hle::modules::fidelityfx: FidelityFX: the host's upscaler serves the title's folder=<FidelityFX SDK 2.4.0 signedbin> versions="4.1.2, 3.1.6, 2.3.4"
VIctory: patched FidelityFX render scale (0.6666667) at title+0x28ef680
VIctory: patched upscaler picker (returns 7) at title+0x7e93f0
2026-11-26T00:05:58 victory_hle::modules::fidelityfx: FidelityFX: upscaler context on the host provider="4.1.2" id=0xf5a5ca1e01001002 render=[2560, 1440] output=[3840, 2160] flags=0x29
2026-11-26T00:06:42 victory_hle::modules::fidelityfx: FidelityFX: first upscaling, host formats of its textures formats=[10, 19, 34, 67]
2026-11-26T00:06:42 victory_hle::modules::fidelityfx: FidelityFX: first successful host upscale result=0 render=[2560, 1440]
…
2026-11-26T00:08:03 19.5 fps, 51.3 ms/frame (35.1 preparing: copies 12.1 ms 101.1 MB, textures 2.0 ms 25.3 MB; 0.0 on the GPU; 14.7 copying back 36.0 MB), 6282 draws/frame, dropped 321 without a host pipeline (0 being made)
2026-11-26T00:08:08 19.5 fps, 51.2 ms/frame (35.5 preparing: copies 13.0 ms 94.8 MB, textures 2.0 ms 28.5 MB; 0.5 on the GPU; 14.7 copying back 34.1 MB), 5223 draws/frame, dropped 357 without a host pipeline (0 being made)
2026-11-26T00:08:14 19.9 fps, 50.3 ms/frame (34.2 preparing: copies 12.2 ms 92.5 MB, textures 1.3 ms 15.2 MB; 0.0 on the GPU; 14.8 copying back 36.7 MB), 5581 draws/frame, dropped 341 without a host pipeline (0 being made)
2026-11-26T00:08:19 21.3 fps, 47.0 ms/frame (30.9 preparing: copies 11.6 ms 94.9 MB, textures 1.3 ms 17.4 MB; 0.0 on the GPU; 13.8 copying back 37.1 MB), 5501 draws/frame, dropped 338 without a host pipeline (0 being made)
2026-11-26T00:08:24 21.9 fps, 45.6 ms/frame (30.6 preparing: copies 11.7 ms 94.7 MB, textures 1.4 ms 17.6 MB; 0.0 on the GPU; 13.5 copying back 36.2 MB), 5474 draws/frame, dropped 342 without a host pipeline (0 being made)
E · FSR 1440p + FG 3: FG 3: proxy 3.1.7, generator 3.1.6, ×2 · 19.9 fps rendered

E-20261126-031014

2026-11-26T00:10:23 victory_hle::modules::fidelityfx: FidelityFX: the host's upscaler serves the title's folder=<FidelityFX SDK 2.4.0 signedbin> versions="4.1.2, 3.1.6, 2.3.4"
2026-11-26T00:10:23 victory_hle::modules::fidelityfx: FidelityFX: frame generation on the title's upscaled frames dll="<signedbin>�md_fidelityfx_framegeneration_dx12.dll" mode="1"
VIctory: patched FidelityFX render scale (0.6666667) at title+0x28ef680
VIctory: patched upscaler picker (returns 7) at title+0x7e93f0
2026-11-26T00:10:24 victory_gpu::framegen: FidelityFX frame generation: proxy swap chain provider="3.1.7"
2026-11-26T00:10:25 victory_hle::modules::fidelityfx: FidelityFX: upscaler context on the host provider="4.1.2" id=0xf5a5ca1e01001002 render=[2560, 1440] output=[3840, 2160] flags=0x29
2026-11-26T00:11:09 victory_hle::modules::fidelityfx: FidelityFX: first upscaling, host formats of its textures formats=[10, 19, 34, 67]
2026-11-26T00:11:09 victory_hle::modules::fidelityfx: FidelityFX: first successful host upscale result=0 render=[2560, 1440]
2026-11-26T00:11:10 victory_gpu::framegen: FidelityFX frame generation: generator for the upscaled frames provider="3.1.6" screen=[3840, 2160] render=[2560, 1440]
2026-11-26T00:11:10 victory_gpu::framegen: FidelityFX frame generation: first upscaled frame's depth and motion given to it frame=1226 render=[2560, 1440] screen=[3840, 2160] camera_pose=false
2026-11-26T00:11:11 victory_gpu::framegen: FidelityFX frame generation: generated frames frame=1228 rendered=3 continuous=2 generated=3 presents=6 waited=0
…
2026-11-26T00:12:28 20.1 fps, 49.7 ms/frame (33.7 preparing: copies 11.8 ms 98.1 MB, textures 1.8 ms 20.6 MB; 0.0 on the GPU; 15.2 copying back 43.1 MB), 5743 draws/frame, dropped 343 without a host pipeline (0 being made)
2026-11-26T00:12:33 20.2 fps, 49.4 ms/frame (34.5 preparing: copies 11.7 ms 92.8 MB, textures 1.4 ms 15.6 MB; 0.0 on the GPU; 15.0 copying back 40.8 MB), 6684 draws/frame, dropped 317 without a host pipeline (0 being made)
2026-11-26T00:12:38 18.2 fps, 54.9 ms/frame (37.5 preparing: copies 12.8 ms 109.2 MB, textures 2.1 ms 27.5 MB; 0.0 on the GPU; 15.6 copying back 44.2 MB), 6903 draws/frame, dropped 358 without a host pipeline (0 being made)
2026-11-26T00:12:43 18.6 fps, 53.7 ms/frame (34.9 preparing: copies 11.4 ms 105.2 MB, textures 1.9 ms 22.5 MB; 0.0 on the GPU; 15.0 copying back 42.9 MB), 6882 draws/frame, dropped 377 without a host pipeline (0 being made)
2026-11-26T00:12:48 19.8 fps, 50.4 ms/frame (36.2 preparing: copies 12.4 ms 88.3 MB, textures 1.6 ms 18.0 MB; 0.0 on the GPU; 15.2 copying back 41.7 MB), 4262 draws/frame, dropped 428 without a host pipeline (0 being made)

@AwkGrep256

Copy link
Copy Markdown
Author

@Marvisak, frame generation from this PR now runs on a second codebase (the 7900 XTX fork) on an RX 9070 XT. Both versions are confirmed in the logs:

FG 3 (this PR) FG 4.0.2 (#2751)
Proxy / generator ✅ 3.1.7 / 3.1.6 ✅ 4.0.0 / 4.0.2, camera_pose=true
Rendered → on screen 19.9 → ~40 🚀 17.9 → ~36 🚀
Stability ✅ after the present-list fix ✅ 6½ min

🔒 It stays opt-in (VICTORY_FIDELITYFX_FRAMEGEN, diagnostics build). Logs are in the comment above. A review when you have time would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants