FidelityFX: add opt-in AMD frame generation to host upscaling #1915
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1917"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-25T00:54:04Z.
Implementation
With
VICTORY_FIDELITYFX_FRAMEGEN=1andVICTORY_FIDELITYFX_DIRpointing to the SDK'sKits/FidelityFX/signedbinfolder, 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.
4.0.03840 × 2160, RGBA84.1.2,1920 × 1080to3840 × 2160amdxc64.dll+0x861b9f. The same crash was observed without FidelityFX.The Series X runtime check used the opt-in upscaler and render-scale switches from #1793. This PR targets
maindirectly 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 warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --locked(including the xtask asset-policy tests)Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:10:36Z.
Review: COMMENTED
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T08:18:42Z.
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. The new head (
33c50dc) mergesmainand now merges cleanly. Thehost.rsconflict is gone. It addsd900d3c(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 loadsamd_fidelityfx_framegeneration_dx12.dllfromVICTORY_FIDELITYFX_DIR, the same waymainalready loads the upscaler inmodules/fidelityfx.rs.About the earlier ask for generated presents: the author's logs (
presents=6for 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 onmain. 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
Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-25T14:37:49Z.
@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
e230ec2on that fork port.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 #1793Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-25T19:50:22Z.
@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.
Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-26T00:29:06Z.
🚀 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.
████████████████3.1.7, generator3.1.6,presents=6for 3 rendered frames.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-030546E · FSR 1440p + FG 3: FG 3: proxy 3.1.7, generator 3.1.6, ×2 · 19.9 fps rendered
E-20261126-031014Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-26T00:37:36Z.
@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:
camera_pose=true🔒 It stays opt-in (
VICTORY_FIDELITYFX_FRAMEGEN, diagnostics build). Logs are in the comment above. A review when you have time would be appreciated.Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-27T11:06:02Z.
🧪 FG3 HUD flicker test
@Marvisak,
a716e049ports the opt-in HUD fix from the fork test on #53 to this FG3 branch. The game draws the HUD as usual. For a matching Series X frame, we give AMD a copy of the scene just before the HUD was drawn so frame generation can distinguish the compass and text from the moving world.For a quick test, use the existing FG3 setup at 1440p → 4K and set
VICTORY_FRAMEGEN_HUDLESS=1in the second run. Keep the HUD visible and repeat the same camera turn. The lineFidelityFX FG3: using matched HUD-less colorconfirms the new path was used. Thanks to anyone who can try it.Imported from Marvisak/VIctory. Originally posted by Anzymanz on 2026-12-01T07:28:21Z.
@AwkGrep256, a measured note on AMD's frame pacing, from running a port of this on Linux. This PR leaves the pacing tuning at AMD's defaults (no
FFX_API_CONFIGURE_FG_SWAPCHAIN_KEY_FRAMEPACINGTUNING), wheresafetyMarginInMsis 0.1. AMD's pacer then holds each real frame for about half the average frame interval after the generated one, and in this title that hold lands on the thread that submits the next frame.FG 2X, 1440p render (4K or native 1440p output; output size made no measurable difference here), RX 9070 XT, Ryzen 9 5950X, CachyOS, Mesa 26.3.1 RADV, GE-Proton. Frames the title renders per second; "evenness" is the median interval between frames reaching the screen divided by the mean (1.0 is perfectly even). One run per row unless stated, each with the rest of the machine idle.
So no fixed margin suits both: moving wants 5-10 ms, standing wants under about 2. What we run instead adjusts the margin once a second from the intervals measured after AMD's wait: evenness under 0.85, or more than 5 % of frames bunched, lowers it by 2 ms; evenness of 0.92 or more with at most 1 % bunched raises it by 1 ms; it stays within 0.1-12 ms, and a changed value goes to the swap chain through the same pacing key straight away. It settles around 3-4 ms in both cases above. Over 16 frame-generation starts (8 with it, 8 without) we saw no crash.
If it's useful here, the margin key alone (an env setting) would already let people try 5-10 ms. Happy to put the adaptive version up as a PR stacked on this one.
Written with Claude Code.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.