framegen: an interface plane of another size than the screen's is drawn to it, not interpolated #135
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/lobomfz--VIctory-xmem!135
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-135"
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?
@Frtuchinno on GitHub · 2026-12-01 23:48 UTC · original
Frtuchinno:fg-hud-plane-scaled→main· +250 −5 · 2 files · 1 commits · closed without mergingWith frame generation (#68) at an output smaller than 4K, the HUD was interpolated with the scene and shook against the world in every generated frame. The proxy composes an interface plane only at the swap chain's size, so
Presentation::ui_planegave up on any other size. ButVICTORY_UI_PLANE=3840x2160is exactly what a smaller output needs for the HUD to be laid out at its right size (#63), so the two did not go together below 4K:Change
compose::Scaler: a one-plane sibling ofComposer. It draws a texture over the whole of a render target of any size, linearly filtered, with colour and alpha as they are (a premultiplied interface stays premultiplied). It has its own root signature and pipeline, and a ring of 16 SRV/RTV slots, so a view is rewritten only well after the presents that read it.framegen::Presentation::ui_plane: a plane of another size than the screen's (RGBA8, and viewable bycompose::view) is drawn by the scaler into our texture, which is now made at the screen's size. That texture is registered with the proxy as before and left in copy-destination state for the F3 panel, as the copy path leaves it. A plane of the screen's size is still copied as before, so 4K is unchanged.The scaler is made on first need and logs it once:
Tested
RX 7800 XT (RDNA3, 16 GB), Ryzen 5 7600, CachyOS (kernel 7.3.6),
proton-cachyos-slr, Mesa 26.3.1 +mesa.patch. Onf7f0360(plus #113 to get past #112). Series X,VICTORY_FSR_4K=performance VICTORY_OUTPUT=2560x1440 VICTORY_FIDELITYFX_FRAMEGEN=1 VICTORY_UI_PLANE=3840x2160,VICTORY_BVH_HARDWARE=0.rustfmtclean on both files, noclippywarnings in them, andframegen::testspass (3) under Wine.Not checked / notes
Composeralready does for the non-frame-generation path. Small HUD text may be a little softer than at 4K.compose::tests::composes_scaled_premultiplied_plane_on_gpufor the scaler yet. I can add one if you want it.run.rscallsapply_ui_planewith a fixed(3840, 2160)output. With #58's smaller outputs, this sizes the back buffer pool for a 4K output (144 MiB rather than 112 MiB at 2560x1440). The pool check then logsDiffers, becauseprepare_outputhas already put the same jump there.cargo xtask policyon the whole tree reports two files already onmain(replay/play/visual/header.html,emit/lower.rssize). This PR touches neither.🤖 Generated with Claude Code
The proxy composes an interface plane only at the swap chain's size, so `ui_plane` gave up on any other and left the interface to be interpolated with the scene. With `VICTORY_UI_PLANE=3840x2160` (the size the title lays its interface out for) and a smaller output, e.g. `VICTORY_FSR_4K` with `VICTORY_OUTPUT=2560x1440`, the HUD shook against the world in every generated frame ("the interface plane is interpolated with the scene plane=[3840, 2160] screen=[2560, 1440]"). Such a plane is now drawn, linearly filtered and with its premultiplied alpha as it is, over a texture of the screen's size (`compose::Scaler`, a one-plane sibling of `Composer`), which is registered with the proxy as before and left in copy-destination state for the panel. A plane of the screen's size is still copied as it was. Co-Authored-By: Claude Opus 5.5 <[email protected]>@DecayingEagle on GitHub · 2026-12-02 14:06 UTC · original
Linux test of
e84edcdon an RX 7900 XT, Wine 11.22 and RADV 26.3.1. I used Series X, 2560×1440 render/output, FSR 4 Native AA (#178),VICTORY_UI_PLANE=3840x2160,VICTORY_FIDELITYFX_FRAMEGEN=1and RT off.On
d044248with the local patches below, the log warned that the UI plane was interpolated with the scene. Adding this PR produced both the scaled-plane and separate-composition messages. In 124.79 s of camera pans the counters advanced by 3,384 rendered and 3,384 generated frames. DXGI reported 54.23 presents/s. That is a proxy statistic. I did not measure physical display delivery or quantify ghosting.Three pause/resume cycles via Start worked with FG on and three with FG off. B didn't close the top-level menu in either configuration with the test pad. No device loss or kernel GPU reset was recorded during the sweeps or pause tests.
Both variants included #163, #164, #173, #178, #179, #188 and a private in-process controller. I enabled per-present logging in the scaled run for the counts. I wouldn't infer a performance difference from these runs.
Test automation and write-up assisted by OpenAI Codex.
@ARustyOven on GitHub · 2026-12-02 19:29 UTC · original · edited 2026-12-02 19:30 UTC
#161
I believe this has been addressed now following the merge of PR 161.
@Luxuride on GitHub · 2026-12-04 12:01 UTC · original · edited 2026-12-05 11:24 UTC
This was fixed upstream on 1 December, in the same file:
ed52726addedcrates/victory-gpu/src/framegen.rs:1692 pub(crate) fn ui_plane(…, rect: [u32; 4], scene), which compares[desc.Width, desc.Height] == display && rect == [0,0,display[0],display[1]]and resamples through the existingComposer(crates/victory-gpu/src/compose.rs:156 pub(crate) fn resample(…)). Landing this PR would replace that with a parallel implementation, andpub(crate) struct Scalerincompose.rs:228now collides by name withcrates/victory-gpu/src/pillarbox.rs:122.One thing your version had that main's does not:
compose.rs:226 const SCALE_RING: u32 = 16;is a 16-deep descriptor ring written while presents can still be in flight, with no fence — that is the intermittent-HUD-corruption class of bug.That is what I can see from the code. If you think
ui_planelacks the letterbox awareness or the ring you needed, open an issue against it so the discussion lands in one place rather than in a 334-commit-old branch.Whether it still has work of its own is the maintainer's call, not mine.
Pull request closed