Series S: answer the FidelityFX upscaler API with a stretch of the render #1189
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1189
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1189"
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?
@Tissma95 on GitHub · 2026-11-25 23:15 UTC · original
Tissma95:main→main· +669 −1 · 5 files · 3 commits · openSeries S: a FidelityFX stand-in, so the world renders without patching the executable
With
--console series-sthe title upscales its world with AMD FidelityFX (amd_fidelityfx_loader_xbox.dll). The upscaler's 20 compute programs come in a container without aDXILpart, which the translator does not read, so the upscale pass draws nothing and the world stays black. None of these programs is bound in a Series X run.This is an alternative to #798, which solves the same problem by patching two functions in the executable so the title picks its own upscaler. The two approaches trade off differently:
victory-hlemov eax, 6; ret)The interface plane is not in this PR any more. #1081 does that blend, with premultiplied alpha by default and more testing behind it. The first version of this PR carried a
compose.rswith straight alpha by default; it has been dropped in favour of #1081.What it does
crates/victory-hle/src/modules/fidelityfx.rs: create, destroy, query and dispatch are answered by the layer. It is on by default, but only the Series S build loads that DLL;VICTORY_FFX=0restores the old behaviour.VICTORY_FFX_RENDER=keepkeeps the quality mode's ratio;VICTORY_FFX_STRETCH=0does a top-left copy instead of the stretch.Helpers in
victory-gpu:list::stretch_texture(RGBA16F through two buffers of ours; the title's bindings are set again by its next draw),list::copy_texture_top_left,draw::forget_host_bindings,resource::texture_shapeandPlacedFootprint::{ZERO, rows}.RGB9E5 output (two commits by @UwUCammie, from Tissma95/victory-fork#1): on some setups the upscaler's output is
R9G9B9E5_SHAREDEXP, not RGBA16F, and the world stayed black behind the movement prompt. The stretch now writes either encoding, chosen from the host destination; the packing follows fxceless/victory-fork#86. A GPU test checks both layouts with pitched rows. Tested by its author on an RX 7900 XT (RADV, Wine).Nothing changes for Series X runs.
Measured (one PC, Ryzen 9 5900X, RTX 3060TI 8GB, 32GB 3600MT/S )
Release build,
--console series-s, with this stand-in and an interface blend applied locally. The switch set is that ofdiagnostics/README.mdplusVICTORY_CARD_HASH_LEN=1, withVICTORY_CARD_WINDOWS_MB=1024 VICTORY_WINDOW_UPLOAD=1.CARD_WINDOWS_MBis set to.Checks
cargo test --workspace --lockedon Windows: all pass. The one exception isxtask policy::tests::repository_passes_policy, which only needsgiton the PATH; it passes in a clone with git, andcargo xtask policy --stagedreports 5 files ok (before the two RGB9E5 commits; they touchlist.rsonly).cargo clippy -p victory-hle --no-deps --all-targets --locked -- -D warnings: clean.cargo clippy --workspace ... -D warningsstops on 8 lints that are already inmainwithout this PR, none of them in a line this PR touches. They are clippy 1.98'smanual_is_multiple_of,unnecessary_sort_by,collapsible_ifandmap_entry, plus dead code:resource::placed_filler_twinsoutside diagnostics builds, andindirect::Rig::depth_written.The title's Series S build upscales its world with AMD FidelityFX (`amd_fidelityfx_loader_xbox.dll`). The upscaler's 20 compute programs come in a container without a DXIL part, which the translator does not read, so the upscale pass drew nothing and the world stayed black. victory-hle fidelityfx.rs (on by default; only the Series S build loads that DLL; `VICTORY_FFX=0` leaves the title's DLL as before): create, destroy, query and dispatch are answered here. The render size asked is the display size (ratio 1, no jitter; `VICTORY_FFX_RENDER=keep` keeps the quality mode's ratio). The upscale dispatch becomes a bilinear stretch of the rendered picture over the upscaler's output, recorded in the title's own list (`VICTORY_FFX_STRETCH=0`: a top-left copy instead). victory-gpu: `list::stretch_texture` (RGBA16F through two buffers of ours; the title's bindings are set again by its next draw) and `list::copy_texture_top_left`; `draw::forget_host_bindings`; `resource::texture_shape`, `PlacedFootprint::{ZERO, rows}`. Co-Authored-By: Claude Opus 5.5 <[email protected]>@HLVM04 on GitHub · 2026-11-25 23:26 UTC · original
On the interface plane's alpha: on the Series X profile the title composites this layer itself, with a final draw that blends one / one-minus-source-alpha, i.e. premultiplied. So
VICTORY_PLANE_PREMULTIPLIED=1may be the right default rather than straight alpha.From our own runs (RTX 5070 Ti, Windows 11, Series S): plane 0 is the 1920x1080 world and plane 1 a 3840x2160 RGBA8 layer holding menus, loading art, the intro video and HUD control hints. A local pass that draws planes 1-3 over the window buffer with one / one-minus-source-alpha, each from its source rect, brings the intro video and HUD hints back. We haven't run this PR's compose path, so this is not an A/B of it.
On the upscaler side, #798 (the title's own upscaler chosen instead of FSR 4) rendered the world lit for us on this card at
9376fd6: median 169 ms against 257 ms on Series X in the same tree, peak commit 23.7 GB against 27.4-28 GB (one run each, about 4.5 min into the first gameplay scene). It may be worth comparing against the FidelityFX stand-in.@Tissma95 on GitHub · 2026-11-26 00:07 UTC · original
Thanks, that's useful. I've since found #1081, which does the same plane blend with premultiplied alpha on by default and has more testing behind it, so I'll drop compose.rs from this PR and point at #1081 instead. My runs agree with it: with the blend on I had the boot and loading screens at 30 fps and 7 runs (2.5 to 8 min) with no driver event.
That leaves the FidelityFX stand-in as an alternative to #798: it answers the FidelityFX API instead of patching the executable, so it doesn't depend on the build hash, but it stretches a 1280x720 render with a bilinear filter where #798 keeps the title's own upscaler.
@ishan-2025 on GitHub · 2026-11-26 00:28 UTC · original
Tested on an 8 GB laptop card, where Series S was black on main: the world renders with this PR and the card has room again.
Machine: RTX 3070 Ti Laptop GPU 8 GB (7,249 MB budget, 32-lane waves), NVIDIA 621.40, i9-12900H, 32 GB RAM, Windows 11 26200.
Tree:
dc4c0fc+ this PR's diff (applies cleanly), diagnostics build. New game from the menus by scripted Enter presses, through the opening cutscene into the prologue; 400 s per run; "world" below is everything after 250 s. Switches in both rows:LEVELS_ON_DEMAND=1 ASYNC_SUBMIT=1 QUEUE2=1 INDIRECT_WINDOW=1 TEXTURE_NO_WAIT=1 MERGE_GAP=64 MERGE_RUNS=4096 STAGING_POOL=0 COPY_PLAIN=1 JOIN_PARTS=1 BACK_OWN_VIEW=1 INDIRECT_GATHER=1 CARD_REHASH_RUNS=1.dc4c0fc, Series Xdc4c0fc+ this PR, Series S,VICTORY_COMPOSE=1One run each, so the 16 % in frame time is within what I would call unproven; the 2 GB of card memory is not.
What the Series S run logged:
FidelityFX upscaler context: answered by us, no upscaling flags=0x29 max_render=(1280, 720) max_upscale=(1920, 1080) native=truepresent planes: the interface is laid over the game premultiplied=false, planes 1920x1080 and 3840x2160 as you describe.ERRORlines, nothing from the driver watch, the same 7 refused compute pipelines as on Series X.One thing to check, the menus in frame captures. With
VICTORY_CAPTURE_WORLD=1every captured frame up to 2832 (menus, loading, intro) is black, and every one from 2836 on (28 frames) holds the world picture. On Series X the same captures show the menus. The queue's "a black frame after a frame that was not" warning fired 358 times over the same stretch. I did not watch the window, so I can't say whether the capture and that check simply read plane 0 before the compose pass, or the interface is not shown in the menus. If it is the first, the capture and the black-frame check could read the composed texture instead.Not tested:
VICTORY_PLANE_PREMULTIPLIED=1, a run withoutVICTORY_COMPOSE, the unit tests, anything longer than 7 minutes.Runs on my machine with my own copy; no game data attached. AI-assisted (Claude Code).
@UwUCammie on GitHub · 2026-11-26 00:29 UTC · original
I found why the Series S world stayed black here with the compositor on. The stand-in got a 1280×720 RGBA16F source and a 1920×1080 RGB9E5 destination. Every sampled upscale on
63fb0aefell through to the incompatible-format copy. The movement prompt was visible over black at both 175 and 217 seconds.Writing the destination in RGB9E5 restored the character, courtyard and movement prompt on my RX 7900 XT (Wine 11.22, RADV 26.3.1). A repeat with the accepted-present sampler counted 492 frames in 73.73 s, or 6.67 FPS, with 4,487 draws/frame. Some scenery still shimmers. The patch also checks bilinear interpolation and row pitch for both output formats with a synthetic GPU readback. Fix against your branch.
@Filip722 on GitHub · 2026-11-26 00:12 UTC · original · edited 2026-11-26 00:37 UTC
I tested
63fb0aeon Bazzite 44 with GE-Proton11-14, vkd3d-protoncae8353ed7959c4+, and an RTX 5060 Laptop GPU (8 GiB, NVIDIA 615.78.08). The local integration is based on upstreamdc4c0fc. It reuses the existing DXC fallback for both shaders and creates the root signatures with the runtime serializer.Two asset-free D3D12 tests built the compute compositor and the FFX stand-in pipelines on the physical RTX. Four existing plane and stretch regressions also passed. Both new paths are separately opt-in in this integration, so the first title comparison can keep the existing stretch while changing the compositor.
In the matched offline Series S title run, the alternate compositor initialized and reached a DXGI Present after FidelityFX. The transition frame recorded 10,645 draws. Captures after Present showed a black field and the diagnostic FPS overlay. The existing compositor also reached DXGI Present on the same profile and output a flat dark-blue field. Both runs subsequently ended with the title stall-watchdog signature reported in #416. No driver reset or D3D12 device removal was observed.
Codex assisted with the integration and tests.
@ishan-2025 on GitHub · 2026-11-26 00:57 UTC · original
A note on my table above: a repeat of the unmodified Series X baseline at the end of the session measured 206 ms median instead of 149 ms (the laptop got slower over the session, cause not established). So please read the frame-time column as "Series S with this PR is not slower than Series X here" and nothing finer. The card-memory difference (4,906 MB against 6,924 and 7,094 MB in the two Series X runs), the world picture in the captures and the absence of a device loss do not depend on that.
AI-assisted (Claude Code).
@AwkGrep256 on GitHub · 2026-11-26 13:18 UTC · original
@Tissma95 The stretch makes sense for getting Series S past the black screen without needing the PC SDK. Since #86 and this PR both handle
ffxDispatch, would you be open to sharing one handler? We could use the PC SDK when it’s configured and keep your stretch as the default fallback. That way both paths can land without competing for the same call.@Tissma95 on GitHub · 2026-11-26 13:43 UTC · original
Yes, im agreed with that
@AwkGrep256 on GitHub · 2026-11-26 14:55 UTC · original
@Tissma95 Thanks! I put both paths together on a preview branch. It registers the PC SDK handler when
VICTORY_FFX_DIRis set and your stretch handler otherwise. The registration test passed in both configurations, and your FP16/RGB9E5 GPU readback test passed on this branch. Series S gameplay still needs a run on the combined build. If this looks good to you, we can settle which PR should carry the shared registration.@Tissma95 on GitHub · 2026-11-26 17:06 UTC · original
Thanks @AwkGrep256, combining both paths behind VICTORY_FFX_DIR looks right to me: the PC SDK when it's there, the stretch otherwise.
I'd suggest #1189 carry the base: the HLE answer to the FidelityFX loader with the stretch handler, since it needs no external download and is what makes Series S render at all. #86 could then rebase on top and add the PC SDK handler and the VICTORY_FFX_DIR switch in the registration. That keeps each PR small enough to review on its own, and Series S support doesn't wait on the SDK path.
I can run the combined build on Series S (RTX 3060 Ti, 720p) and report back.
@AwkGrep256 on GitHub · 2026-11-26 17:29 UTC · original
That order works for me. Thanks for offering to test both paths on Series S. @fxceless, are you good with landing #1189 first? Once it’s in, I’ll update #86 on top so the PC SDK stays opt-in and the stretch remains the default.
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.