Repository navigation
GPU: composite multiple PresentX planes (Series S UI) - #1997
Conversation
VIctory V2: community PRs, merged and testedOpen PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: Unofficial community fork of Marvisak/VIctory, GPL-3.0. |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Multiple PresentX planes composited (Series S UI) — display-path feature; needs hardware validation on the actual Series S display path.
|
I checked the compositor-initialization failure path on d732465 with WARP. The original test checks recovery on a later frame. In the failed frame itself, the two-plane call returns without presenting the primary plane. 5a1b9ad is one commit on that exact head. It selects the primary plane before sizing the swap chain when compositor setup fails. The same synthetic test uses a red 32×32 scene and a premultiplied blue 64×64 overlay. At the injected setup failure, the original head skipped the frame. The fixed build presented the 32×32 scene and read back [255, 0, 0, 255]. The next two-plane frame initialized the compositor, resized to 64×64, and read back [127, 0, 128, 255]. Focused test 10/10, full WARP GPU suite 148 passed and 2 ignored, strict GPU Clippy and asset policy passed. |
|
A separate PresentX case on d732465: two distinct title texture resources can alias one host texture. With one alias per plane, the original path records the temporary COPY_SOURCE state for the second alias and restores it last. 660568e is one commit on that exact head. It reuses the original state for each alias, restores it once, and records one pair of compositor barriers per host texture while still drawing each plane. The WARP regression clears a real shared BGRA8 render target and submits both title aliases through PresentX. The original head leaves the shared state at COPY_SOURCE (0x800); the fixed build leaves RENDER_TARGET (0x4). Focused test 10/10, full WARP GPU suite 149 passed and 2 ignored. Strict GPU Clippy and asset policy passed. This change merges cleanly with 5a1b9ad. |
|
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at AI-assisted (Claude Code). |
|
Calvix2k, PortBridge checked the source SRV selection at The patch keeps their own typed format. The exact source-extracted CPU test flags the three original choices and passes with the patch. Nine controls stay the same, including format 28 in your report and the existing typeless and sRGB selections. On RTX 4070 Ti SUPER, the standalone shader used valid own-format views only. Both 16-bit formats matched their float32 reference words. The 8-bit SNORM sample exceeded our strict numeric tolerance (maximum error 1.54e-5 versus 2e-6), so I kept the failed control in the results. Patch, source and raw output. This is separate from the alias and fallback fixes already in the thread. It establishes a view-selection issue on synthetic inputs. AI-assisted PortBridge verification (OpenAI Codex). |
|
Automated triage for the maintainers. Merge candidate. Rebased onto
On your reply: the stride and blend evidence (the Series S render, plus the independent GTX 1650 A/B in this thread, black menus without the PR) is enough for this. Planes are stretched over the full target; any placement in the rest of the plane struct is ignored, a fine shortcut for now. Non-blocking: the SRV uses CI: passing. Generated by Claude Code |
2224c61 to
5c42b8c
Compare
|
Going through the triage's list: Plane stride (0x48). The layout is Blend mode. Planes after the first are blended as premultiplied ( Skipped frame on compositor failure — fixed in The other thread items (two planes aliasing one host texture leaving it in Other compositor PRs (#1287, #1330, #1970): maintainer's choice. This one is the variant with an in-game Series S render behind it (plane sizes logged, UI visible) plus the failure fallback above. |
… is the title's interface (from Marvisak#1997 and fxceless/victory-fork#188): in Series S mode the title presents its game image (1920x1080) in plane 0 and its interface (3840x2160, menus, HUD, subtitles, prompts, the loading spinner) in plane 1; read 0x30 bytes on, the second plane was the first's tail, a plane of no resources, so the interface was never composed over the game image and the start screen and menus were black. For the first 20 s of presents a line a second names what each plane shows and how many upscales were recorded since the last one
|
In-game A/B on a GTX 1650 (Turing, 4 GB, driver 32.0.16.2124),
The same holds with #492, #2332 and #1868 added, and removing only this PR from that stack makes it black again. The world itself is still black on this card either way. AI-assisted (Claude Code); measured on my own machine. |
|
I ported the two fixes from the triage note onto the exact author head 5c42b8c. The fork branch preserves that head and carries two commits.
The focused pair passed 10/10. The full WARP GPU suite had 149 passed and 2 ignored with both settings of VICTORY_D3D12_DEBUG. Strict GPU Clippy in both configurations and asset policy passed. Please preserve the Git author of each commit if you cherry-pick them. If you fold either change into another commit, please add: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com |
Series S supplies the scene and interface as separate present layers. The diagnostics hook ran only when a single complete layer was copied, so selected composed frames produced no PNG. Read the composed swap-chain buffer before Present for selected frames. Restore PRESENT after recording the copy and use the existing wait before encoding. Log when FidelityFX receives a separate interface plane because the SDK adds that plane after the capture. Based-on: Marvisak#1997 Tested-on: RX 6800, Fedora Linux 45, Wine and vkd3d-proton on RADV (Series S dual-plane capture, plus Toolbox Windows MSVC build) Assisted-by: gpt-6.2 sol xhigh
When the multi-plane compositor cannot be created, the frame was dropped (`return None`). Show plane 0 through the single-plane copy path instead, and keep retrying the compositor on the next present. The test now asserts that the failing frame is presented, not skipped.
(cherry picked from commit 5a1b9ad)
(cherry picked from commit 660568e)
The ported fix in the previous commit was written against a `host_resource` that lent its host texture; on `main` it returns a clone, so the composed list cannot hold `&ID3D12Resource` across the `host.present` call. Hold the clones and lend them to `present`; the per-texture state bookkeeping is unchanged.
5c42b8c to
fdc5ff5
Compare
|
Picked both up with their authorship preserved and rebased onto
Resolving the rebase also kept Verification on Windows 10 / RX 7800 XT: |
# Conflicts: # crates/victory-gpu/src/host.rs
|
Tested on Windows 10 22H2 (19045), RX 6800 XT, Agility SDK runtime (#84), merged with #1793 on |
Upstream model everywhere, our additive diagnostics kept. 15 files conflicted, all resolved file-by-file: - README: our fuzz_tests/ship-profile/VICTORY_DIFF_ONLY/VICTORY_NAME_SHADERS notes beside upstream's status/blake3-paths/translate-jobs wording. - descriptor/host.rs: upstream Marvisak#2462 (no typed UAV in a format the host cannot store to) lands untouched through the merge; keeps its device-removal fix, no behavior change on capable hosts. - descriptor.rs: our monotonic heap-id guard + upstream Marvisak#2234 (released view heap takes its page table with it). - pipeline/library.rs: upstream Marvisak#2179 (lock-free loads via Shared) + our best-effort periodic save (try_lock on state). - capture.rs: our Marvisak#2607 signed-32 decode + test beside upstream's r32_integer_to_rgba. - draw.rs: our buffer_state tracking + root-signature test beside upstream's marked page-range refresh (Marvisak#2172) + sampler-heap test. - pipeline/host.rs: upstream vertex/depth-bounds/integer-blend model (stream_pipeline, host_blend, depth_with_bounds) + our padding-zeroing clean_* and Stream zeroing; both test batches kept. - pipeline/make.rs: keep lost/screen fields + upstream skipped_shader. - pipeline.rs: keep bytes()/pipelines_waiting() beside for_test. - host.rs: multi-plane present (Marvisak#1997, Compositor) + our previous-frame wait, presented/probed frame tracking, keep-textures, drain-before-save; both test modules (submissions + present_plane_tests). - queue.rs: upstream blinks (Option<bool>) supersedes ours. - shadow.rs: upstream update_tracked/update + merge_writeback (Marvisak#2054) + our stale/submission_done/Part snapshots/buffer_states; update_free and update_busy retired as subsumed (no callers left). - xmem.rs: upstream shared system_commit() supersedes our inline version. - emit/host.rs: our fence-event wait() + upstream SharedDevice/Marvisak#244 (shared/serialized WARP device). - emit/lower.rs: upstream i64 dword ordering (Marvisak#1599) + our f/t lane path and RDNA2 opcode names; tests moved verbatim to lower_tests.rs via #[path] (lower.rs exceeded the 512 KiB asset-policy limit after the merge; module path unchanged, content byte-identical). - emit/valu_tests.rs: our s_load_dwordx4_at + upstream sopk helper. - gfx10/opcodes.rs: upstream pub(crate) + our RDNA2 names. - fuzz_tests.rs: Host::from_device() for upstream's new warp field. Test adaptations (same execution-model class as the 13f91ca merge): 8 upstream tests written for synchronous execute() drain explicitly on our async-completion queue (marked-UAV/placed-view/rebind tests); Host::from_device() port; words() accessor for privatized field. Gates: cargo test --workspace --locked green, clippy --workspace --all-targets --all-features -D warnings clean, xtask policy 197 ok.
Re-lands Yaekai's #211 (with swarm's and Blitz Studios' follow-up commits from the same branch) on
main940d32f. #211 was closed by the automated asset-policy check; the change is code only — no assets, no new dependencies — andcargo xtask policypasses on this head.Why
PresentXreceives several planes, but the host presents only the first (queue.rs:*plane.resources). A Series S title presents the scene at 1080p in plane 0 and its UI at 4K in plane 1, so the UI (account picker, menus, HUD) never reaches the swap chain: the window shows the scene or, before the world, black. #904 has the reproduction data; on my RX 7800 XT / Windows 10 the same build shows a black window on Series S until this compositor is in.What
queue.rs::presentgathers every plane's resource and current state instead of the first.host.rsgains a small compositor: a fullscreen-triangleTexture2Dshader (compiled withD3DCompile, no new dependency) draws plane 0 opaque and later planes alpha-blended into a swap chain sized to the largest plane, so a 1080p scene under a 4K UI composites 1:1. The root signature is serialized explicitly and the pipeline states are built once per format.Verification
cargo test -p victory-gpu --features diagnostics --lib: 147 passed, 1 failed — the one failure isdraw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view, which fails identically on unmodifiedmain 940d32fhere (checked separately).host::tests::present_compositor_builds_both_pipeline_statesandhost::present_plane_tests::compositor_failure_preserves_single_plane_presentationpass on this host, as do the composited-pixel tests for the recovery path.--console series-sshows the account picker and menus (1080p scene plane under a 4K UI plane) wheremainshows a black window. That run is what the plane sizes in the PR description come from (0: 1920×1080, 1: 3840×2160, both format 28).Known follow-up (not in this PR)
With the UI visible, Series S then reaches the placed-descriptor crash tracked in #1118 (
descriptor::recordon a handle in a GPU-only page). This PR does not change descriptor memory; it only makes the planes that the title already presents reach the screen.Authors of the commits are Yaekai, swarm and Blitz Studios; I only rebased them onto current
main, resolved nothing (the cherry-picks applied cleanly) and ran the checks above.