Add experimental AMD frame generation test path #1287

Closed
github-bot wants to merge 18 commits from gh-pr/1287/head into gh-pr/1287/base
Owner

@⁠AwkGrep256 on GitHub · 2026-11-24 17:08 UTC · original
AwkGrep256:pc-fsr-framegen-test → main · +3484 −194 · 30 files · 18 commits · closed without merging

I got AMD frame generation to run in-game on an RX 9070 XT with Proton Experimental. I tested both Series S and Series X. Both used FSR 4.1.1 for upscaling and 3.1.6 for frame generation.

Once the game sent depth and motion data, three rendered frames produced three extra frames. The swapchain counted six presents in each run. The intro stayed at 30 rendered FPS. The world was still mostly black, and Series X hit a GPU reset after about 114 seconds.

This branch includes the PC FSR path and Series S presentation changes. Native Windows testing is still in progress.

To test on Windows, build with diagnostics, set VICTORY_FFX_DIR to AMD’s FidelityFX SDK Kits\FidelityFX\signedbin directory, set VICTORY_FFX_FRAMEGEN=1, and launch with --console series-s. Look for ffx framegen: generated game frames after world loading.

Related discussion: #944

For Series X, the README includes the additional upscaler and scale settings used in testing.

**@⁠AwkGrep256** on GitHub · 2026-11-24 17:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/1287) `AwkGrep256:pc-fsr-framegen-test` → `main` · +3484 −194 · 30 files · 18 commits · closed without merging I got AMD frame generation to run in-game on an RX 9070 XT with Proton Experimental. I tested both Series S and Series X. Both used FSR 4.1.1 for upscaling and 3.1.6 for frame generation. Once the game sent depth and motion data, three rendered frames produced three extra frames. The swapchain counted six presents in each run. The intro stayed at 30 rendered FPS. The world was still mostly black, and Series X hit a GPU reset after about 114 seconds. This branch includes the PC FSR path and Series S presentation changes. Native Windows testing is still in progress. To test on Windows, build with diagnostics, set `VICTORY_FFX_DIR` to AMD’s FidelityFX SDK `Kits\FidelityFX\signedbin` directory, set `VICTORY_FFX_FRAMEGEN=1`, and launch with `--console series-s`. Look for `ffx framegen: generated game frames` after world loading. Related discussion: #944 For Series X, the README includes the additional upscaler and scale settings used in testing.
The clamp was HLSL compiled at run time by the system's D3DCompile. Wine's
d3dcompiler_47 rejects it (no Load on RWByteAddressBuffer, no store to a
structured buffer, and the RootSignature attribute is ignored), so under
Wine and Proton clamp() failed and every indirect execution was dropped.

The same shader is now emitted as DXIL by the shader crate
(emit:🗜️:argument_clamp) and its root signature is made from a
description, so no shader compiler is needed on any host. For that the
shader builder learns root UAVs (raw buffers), beside root CBVs and SRVs.

Two GPU tests run the clamp over records of each kind and compare with
the bounds written out in Rust, and check that records past the list's
budget run empty.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The title ends the process on purpose when its main thread has not advanced
for about 30 one-second ticks (a write to address 0 at +0x23cf683, with a
second one at +0x2215c35 right after the handler call). On a host much slower
than the console a long load can exceed that window.

With VICTORY_NO_WATCHDOG=1 the loader jumps over the abort site and makes the
handler's fault a NOP. Each patch is applied only if the original BLAKE3
starts with the 1.0.2.1 identity and the exact original bytes are at the
offset; otherwise it logs a warning and does nothing. Off by default.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A root SRV is a bare GPU address: nothing bounds what a shader reads
through it. Vertex fetch reads its stream through a root SRV with no
record limit, and a mesh shader read past the end of the buffer's host
copy into memory the host had already freed (the "inside freed texture"
device removal after the fix for #59: the fault lay just past the copy's
end, in the gap where released textures had been).

Each root SRV is now a one-descriptor table holding a raw view of the
host copy from the root address to the copy's end, made once per address
per list in the heap's dynamic slots; reads past the end return zero, as
for any bounded view. A root SRV the title did not set, or one with no
host copy, gets a null raw view (an unset table is undefined). Addresses
not on 16 bytes, which a raw view cannot start at, read zeros and are
logged once. VICTORY_ROOT_SRV_DIRECT=1 restores root descriptors.
A diagnostics switch for 32-lane hosts: VICTORY_SKIP_WAVE64=mesh,compute
drops draws and dispatches whose pipeline has a program of a listed stage
written for 64-lane waves, so testers can tell whether those programs
cause a GPU hang without listing shader hashes one by one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With VICTORY_FFX_DIR pointing at the FidelityFX SDK's signedbin, the five
ffx* exports of amd_fidelityfx_loader_xbox.dll and
amd_fidelityfx_upscaler_xbox.dll are served by AMD's PC loader for D3D12
on the host device. The console structures have the PC layouts; the
backend description, command list and textures are swapped for the
host's, and the list's cached bindings are dropped after the upscaler
records.

The console upscaler only has the fixed 1920x1080 Quality tables, so a
Series X configuration that picks it (3840x2160) fails at context
creation. The PC upscaler takes any size.

Diagnostics: VICTORY_UPSCALER=<rva>[,<kind>] makes the title's upscaler
picker return <kind> (1.0.2.1: 7E93F0, 4 direct calls; 7 is FSR, 6 the
title's own).
Use the AMD DX12 proxy swapchain when diagnostics opt in. Feed it the depth and motion vectors from the latest submitted title upscale, and log generated frames alongside completed presentation counts. Report the actual upscaler provider and send the PC SDK version description.
The title's FSR render-size method (1.0.2.1: 28EF680) takes 2/3 on
Series S and 1.0 on Series X, so Series X with FSR forced on renders at
full 4K and overflows its memory plan (a 32 MiB surface in its third
graphics pool, then the transient heap). With VICTORY_FFX_SCALE=0.6667
it renders 2560x1440 and FSR upscales to 3840x2160; 0.5 gives 1080p.

Both scale loads of that method are pointed at our constant in the
padding after it, after checking the code there.
Record the diagnostics build, console profiles, and the presentation counts Windows and Linux testers can compare.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:26:25 +00:00
github-bot closed this pull request 2026-11-26 04:26:25 +00:00
Author
Owner

@⁠marquezinii on GitHub · 2026-11-24 20:55 UTC · original

Native Windows on NVIDIA, without the title. RTX 5070 (Blackwell), driver 621.40, Windows 11 26300, head 7566b6d. AMD's signed DLLs from SDK v2.4.0 Kits/FidelityFX/signedbin. The upscaler side is in my note on #1284: the tests pass and the RGB9E5 fallback is the NVIDIA path.

  • cargo test -p victory-gpu --features diagnostics --locked: 54 passed, 1 ignored.
  • Versions on this card: upscalers 3.1.6 and 2.3.4, frame generation 3.1.6; no FSR 4. With a throwaway test (not pushed), this branch's ffxCreateContext asks for upscaler 4.1.2 and gets provider 3.1.6 with result=0, for Series X and Series S sizes. Calling the loader directly with the 4.1.2 version description and without it gives the same. So the fixed SDK_UPSCALER_VERSION is harmless on NVIDIA, and retry_legacy is not reached.
  • Frame generation swapchain: framegen::Presentation::create with VICTORY_FFX_FRAMEGEN=1, on a hidden 1920x1080 window with the host's queue (RGBA8, 2 buffers, flip discard), returns the proxy swapchain. It asks for swapchain version 4.0 while the card only has 3.1.6.

Not checked: generated frames with real depth and motion vectors, and anything in game; I have no copy of the title.

**@⁠marquezinii** on GitHub · 2026-11-24 20:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/1287#issuecomment-7144234710) Native Windows on NVIDIA, without the title. RTX 5070 (Blackwell), driver 621.40, Windows 11 26300, head `7566b6d`. AMD's signed DLLs from SDK v2.4.0 `Kits/FidelityFX/signedbin`. The upscaler side is in my note on #1284: the tests pass and the RGB9E5 fallback is the NVIDIA path. - `cargo test -p victory-gpu --features diagnostics --locked`: 54 passed, 1 ignored. - **Versions on this card:** upscalers `3.1.6` and `2.3.4`, frame generation `3.1.6`; no FSR 4. With a throwaway test (not pushed), this branch's `ffxCreateContext` asks for upscaler 4.1.2 and gets provider `3.1.6` with `result=0`, for Series X and Series S sizes. Calling the loader directly with the 4.1.2 version description and without it gives the same. So the fixed `SDK_UPSCALER_VERSION` is harmless on NVIDIA, and `retry_legacy` is not reached. - **Frame generation swapchain:** `framegen::Presentation::create` with `VICTORY_FFX_FRAMEGEN=1`, on a hidden 1920x1080 window with the host's queue (RGBA8, 2 buffers, flip discard), returns the proxy swapchain. It asks for swapchain version 4.0 while the card only has 3.1.6. Not checked: generated frames with real depth and motion vectors, and anything in game; I have no copy of the title.
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-11-25 00:54 UTC · original

Superseded by #1917, which adds the opt-in frame-generation path to the current host FidelityFX module. The new PR includes the Windows verification results.

**@⁠AwkGrep256** on GitHub · 2026-11-25 00:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/1287#issuecomment-7149008748) Superseded by #1917, which adds the opt-in frame-generation path to the current host FidelityFX module. The new PR includes the Windows verification results.
Author
Owner

@⁠AwkGrep256 on GitHub · 2026-11-25 05:52 UTC · original

Reworked onto main's fidelityfx module in #1917, with only the frame generation change (this branch also carried other people's commits).

**@⁠AwkGrep256** on GitHub · 2026-11-25 05:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/1287#issuecomment-7154222956) Reworked onto main's `fidelityfx` module in #1917, with only the frame generation change (this branch also carried other people's commits).

Pull request closed

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/Marvisak--VIctory!1287
No description provided.