PC FSR support (FidelityFX on host D3D12): branch ready, can't open a PR #730
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#730
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@AwkGrep256 on GitHub · 2026-11-24 08:40 UTC · original
I have a working branch that answers GTA VI's FidelityFX calls with AMD's PC FidelityFX upscaler (D3D12, SDK 2.4.0) in place of the Xbox DLLs:
https://github.com/AwkGrep256/VIctory/tree/pc-fsr
Tested on an RX 9070 XT under Wine + vkd3d-proton. PRs are limited to collaborators right now, so I'm leaving it here. Happy to open the PR when that's possible.
@AwkGrep256 on GitHub · 2026-11-24 10:46 UTC · original
update: the upscale itself now runs in game.
tested on linux (rx 9070 xt, wine 11.22, vkd3d-proton 3.2) on top of cdomergue's branch from #752 (the 4 fault fixes + #211 for the series s screen), series s profile,
VICTORY_FFX_DIRset:ffxDispatchand the upscale gets recorded on the host list, result 0series x is still where it was: forcing the picker to fsr creates the 4k context fine, but then the title can't fit a 3840x2176 buffer into its own memory pool and stops. rockstar never ships fsr on series x so that budget has no room for it, would need a separate change.
branch: https://github.com/AwkGrep256/VIctory/tree/pc-fsr
@AwkGrep256 on GitHub · 2026-11-24 11:01 UTC · original
series x works now too.
with fsr forced on, series x was rendering at full 4k, because the title's fsr render-size method (28EF680 in 1.0.2.1) takes 2/3 on series s but 1.0 on series x. that blew its memory plan: first a graphics pool (2199 MiB), then the transient heap (710 MiB).
added
VICTORY_FFX_SCALE(diagnostics) to the branch. it points that method's scale at our own value:VICTORY_FFX_SCALE=0.6667-> 2560x1440 upscaled to 3840x2160VICTORY_FFX_SCALE=0.5-> 1920x1080 upscaled to 3840x2160with 0.6667 +
VICTORY_UPSCALER=7E93F0+VICTORY_FFX_DIR, series x creates the context at 2560x1440 -> 3840x2160 and runs at 29 fps in the menus with 4.3 GiB, no memory patches needed. haven't taken it into the world on series x yet.https://github.com/AwkGrep256/VIctory/tree/pc-fsr
@Castyan on GitHub · 2026-11-24 11:33 UTC · original
Native Windows test of
pc-fsratf96ad82with only #211 at24a387dadded for Series S presentation.Windows 11 x64 build 26300, Ryzen 5 9600X, RTX 5060, Rust 1.98.1,
diagbuild. Windows GPU counters confirmed the RTX 5060's 3D engine in both runs. Both launches used Series S, native D3D12, fresh separate profiles and caches, and no scripted input or forced upscaler settings.ffxCreateContextreturned0at 4.30 s3.1.6, 1280 × 720 → 1920 × 1080In the FSR-on run, the process loaded both PC DLLs from the official AMD SDK v2.4.0 directory. Both DLLs passed AMD signature verification. The branch's targeted FFX unit test passed. Both runs created a 3840 × 2160 swap chain for presentation. The FSR context dimensions above describe the upscaler.
This verifies context creation on native Windows with the RTX 5060. The startup trace contains no
ffxDispatchobservation. World rendering and upscale image quality remain to be tested.AI-assisted test automation and report.
@AwkGrep256 on GitHub · 2026-11-24 11:41 UTC · original
Thanks for testing it on Windows, good to know it works there too. On Linux the dispatch also ran in the world on Series S, so the image itself is the last thing left to check.
@AwkGrep256 on GitHub · 2026-11-24 11:25 UTC · original · edited 2026-11-24 11:44 UTC
📊 FSR integration: status
Branch:
AwkGrep256/VIctory@pc-fsr(f96ad82, rebased onffe310e)ffxCreateContextffxQueryffxDispatchffxConfigure/ffxDestroyContextresult=0), game keeps runningVICTORY_UPSCALER)VICTORY_FFX_SCALE; without it the title renders native 4K and overflows its memory planVICTORY_FFX_SCALE=0.6667→ 1440p,0.5→ 1080p (output 4K)-D warnings),cargo xtask policy, README updated⚙️ Usage
🧪 Tested on
RX 9070 XT, CachyOS, Mesa 26.3.1, Wine 11.22, vkd3d-proton 3.2.0, title 1.0.2.1. Series S in-world run on top of cdomergue's #752 branch.
Native Windows 11, RTX 5060 (startup, context creation): @Castyan, see above.
Will open the PR once PRs are open again.
@AwkGrep256 on GitHub · 2026-11-24 14:25 UTC · original
I tested the new build with PC FSR on the RX 9070 XT using Proton Experimental. It selected FSR 4.1.1, and the game successfully submitted a 720p to 1080p upscale in Series S and a 1440p to 4K upscale in Series X.
Series X needed the upscaler and scale overrides. It hit a GPU reset after upscaling and frame generation had both run. The world is still mostly black, so I can’t judge picture quality yet. The source and settings are in the test branch.
I put the frame-generation results in #944.
@bittertea0323 on GitHub · 2026-11-24 16:21 UTC · original
Windows confirmation of the context — and the upscale never runs:
OUTPUT(slot 6) has no host textureYour branch builds and creates the context correctly on native Windows 10, and then fails one step later,
before any picture exists. The author note "haven't checked the image itself yet" is exactly where it
stops here.
Machine: Windows 10 22H2 UBR 3393, RTX 4070 SUPER 12 GB, Ryzen 7 7800X3D, 31 GB, driver 591.74, title
1.0.2.1, diag build, native D3D12 (not Wine).
Tree:
pc-fsrf96ad82cherry-picked onto#189+#940+#729+#737+#352+ our fixes(clean, no conflicts).
Settings:
VICTORY_FFX_DIR=<SDK 2.4.0 Kits/FidelityFX/signedbin>,VICTORY_FFX_SCALE=0.5,VICTORY_UPSCALER=7E93F0,VICTORY_WAVE64_EMULATE=emulate, Series X,VICTORY_TEXTURE_MIP_DROP=1.What works:
The scale override does exactly what it says: the title builds a 1920×1080 render target and asks for a
3840×2160 output. That part is solid.
What does not: every dispatch.
slot 6isOUTPUTinffx.rs(const OUTPUT: usize = 6), so the null makes the guard below returnbefore the SDK is ever called:
The run still completes 7930 presented frames at 25–30 fps with no device removal, i.e. it is a silent
no-op, which is why the window stays empty while everything looks healthy.
Why the output texture is missing, as far as we can tell.
host_resource()returnsNonewhenresource(this).hostis empty, and the output of the title's FSR path is plausibly the swapchain backbuffer we create in
host.rs(CreateSwapChainForHwnd) — that is not a title resource in victory's table,so it has no host copy and no entry to find. On Linux/vkd3d-proton your run got past this, which fits: the
presentation path differs there.
Two candidate fixes, in the order we would try them:
OUTPUTinffxDispatch: whenhost_resourceis empty, pass the presenter's current backbuffer instead of nulling the slot.
host_resource()finds them like any other.Not measured: whether the FSR dispatch then succeeds with a valid output (we stopped at the null), and
whether 1920×1080 → 3840×2160 actually reduces the world frame cost. The theory is a quarter of the pixels,
but our GPU time is dominated by mesh emission, so the saving needs measuring rather than assuming.
Happy to test a patched
ffx.rson this machine — we have the SDK layout and the exact knobs workingalready.
@bittertea0323 on GitHub · 2026-11-24 16:31 UTC · original
The output slot is an XMem resource, not a D3D12 one — so it can never have a host texture
Follow-up to my confirmation above, with the shape of the missing slot now measured. This changes the fix
from "register the swapchain buffer" to something structural.
I added the resource's description to the warning; it prints the same every frame:
Decoding
flags=3145733(0x300005): the low bits areALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESS,and the
0x300000above them are the console's VIDMM flags. So this is not a swapchain buffer and not aplain committed texture — it is a title-memory (XMem) resource.
That matters because
host_resource()returnsNonewheneverresource(this).hostis empty, and XMemresources never get a
hostat all: victory simulates them with shadow copies, so they never pass throughhost_texture()/CreateCommittedResource. Which means the null is not a lookup that missed — the texturedoes not exist in any form FSR could write to.
Two consequences for the branch:
VICTORY_FFX_SCALEworks and is worth keeping. With0.5on Series X the title builds a 1920×1080render target and asks for 3840×2160:
render=[1920, 1080] upscale=[3840, 2160] result=0 provider="3.1.6". World draws go from ~2500 to5103 draws/frame and frame time improves from 1565–1799 ms to 1034–1199 ms.
returns before the SDK call. The title then falls back to its own path:
copiesclimbs from ~142 MB to569 MB per frame (299–422 ms of the frame), which eats most of the gain from rendering at half size.
Net: 0.6 → 1.0 fps rather than the 4× the scale suggests.
So a working FSR path needs XMem resources to have host textures (or a host-visible XMem surface), not just a
slot fix in
ffxDispatch. Two smaller notes in passing:format=67is absent fromresource::family(), so the typeless retry I added for"format has no host unordered access" does not fire for it. That retry is still correct for the formats
that are in the table; 67 needs its family member added.
Not measured: what the picture looks like once an upscale actually completes, and whether the 569 MB copy
disappears or merely moves if the output slot starts resolving.
@AwkGrep256 on GitHub · 2026-11-24 16:32 UTC · original
Thanks @bittertea0323 nice catch. I wrote this on Linux so i completely missed the backbuffer path. Just booted into windows to debug it, will push a fix soon!
@AwkGrep256 on GitHub · 2026-11-24 18:24 UTC · original
@bittertea0323 I added an RGB9E5 fallback in #1284 (AwkGrep256/VIctory@bea3a58). Would you try it on the same Windows 10 / RTX 4070 SUPER setup? Please send just the
RGB9E5 host format support,no host RGB9E5 texture with title flags,recorded RGB9E5 output conversion, andfirst upscale recordedlines if they appear. The first two tell us what the runtime supports and why the original texture allocation failed.The fallback sends FSR an FP16 output and packs it back into the title’s RGB9E5 texture on the GPU. A local GPU test verified packed HDR pixels and sampled them in a second compute pass. My RX 9070 XT game run used the direct path (
format=67 packed=false result=0) and later hit device removal without breadcrumbs. I still need a capture from the fallback run to tell whether the title reads the output and whether the input is already black. If you see ano writable host viewwarning, please include that too.@Marvisak on GitHub · 2026-11-25 01:48 UTC · original
Automated triage for the maintainers.
The feature requested here is in
mainnow. Commit0b35b7f("FidelityFX on host and console paths") addedcrates/victory-hle/src/modules/fidelityfx.rs. WhenVICTORY_FIDELITYFX_DIR(or[paths].fidelityfx_dir) names a folder with the PC FidelityFX build, it answers the title's FidelityFX calls with the host PC upscaler on the host device, and the README documents the switch. Only the upscaler is served there; frame generation is refused.The rest of this branch is in your open PR #1793. That is the Series X part: the
VICTORY_UPSCALERpicker and theVICTORY_FFX_SCALErender scale, reworked on top ofmain's module. Frame generation is in #1917 and is discussed in #944. Further work can continue on those PRs.Proposed close: implemented in main by
0b35b7f, with the remaining parts in #1793 and #1917. This issue will be closed in 48 hours unless the reporter replies or a maintainer removes thetriage: proposed closelabel.Generated by Claude Code