GPU tests: verify a synthetic frame through PresentX #1143
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1143"
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?
Imported from Marvisak/VIctory. Originally posted by Doffi4 on 2026-11-24T16:11:13Z.
Adds a self-contained opt-in Windows D3D12.X smoke test based on the findings in #1131.
The fixture generates asset-free synthetic Xbox-style vertex and pixel shader containers in memory. It uses the normal pipeline stream and worker, clears and submits one target, then resets the list and draws a full-screen triangle. The first two frames are 384×216. It then presents a 320×180 draw and returns to the original 384×216 target with a distinct blue clear, verifying fresh content after both resizes. All four frames go through PresentX. The test checks all RGBA pixels in the actual DXGI back buffers after the copy, checks the buffer rotation, and requires S_OK from DXGI Present.
The test needs an interactive Windows desktop and is ignored by default. Adapter selection and back-buffer instrumentation are compiled only into diagnostics test builds. No external compiler or game files are needed.
AI-assisted testing
Imported from Marvisak/VIctory. Originally posted by Doffi4 on 2026-11-24T16:18:02Z.
AI-assisted testing follow-up: the smoke test now presents two frames at 384×216, then presents a 320×180 target through the same queue and swap chain. The third present requires DXGI S_OK, the new back-buffer dimensions, all 57,600 RGBA pixels matching the expected triangle color, and buffer rotation restarting after ResizeBuffers.
Passed on Radeon 780M (32.0.32029.2010), RTX 5060 Laptop (32.0.16.2101), and WARP on Windows 11 25H2 x64, debug + diagnostics: 3 pass, 0 skip, 0 fail. Clippy and the staged asset policy passed.
Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T16:37:01Z.
We used the back-buffer readback approach from this PR to check the single-plane fallback from #841 on an RTX 4090 under Wine/GE 3.2. The test used synthetic targets on the fallback branch (
d723113) with test-only instrumentation. Its usual single-plane capture samples the source texture, so we added a read of the current DXGI back buffer immediately after the copy.With a black 3840×2160 primary and a completed red 2560×1440 fallback available, frame 4 put [255, 0, 0, 255] in every pixel of back buffer 1 at 2560×1440. Presenting the same primary again, after the fallback had been consumed, put [0, 0, 0, 255] in every pixel of back buffer 0 at 3840×2160. Both DXGI Present calls returned S_OK.
That confirms the fallback selection reached the swap chain across both resizes. Identifying the pass that should produce the title’s 4K image still needs a title capture. The fixture ends at the swap chain and does not measure desktop scanout.
Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-24T17:39:42Z.
Review: COMMENTED
On
69a49fa, frames 2 and 3 draw with the same pipeline and expect the same uniform green. Frame 3 checks the new 320x180 dimensions and distinguishes the draw from the magenta clear. In a CPU check of the size and RGBA assertions, uniform green at 320x180 satisfied the frame 3 checks regardless of which draw produced it. The controls rejected the old 384x216 size and the magenta clear, and frame 4 rejected green because it expects blue. Could the frame 3 draw use its own color so the readback distinguishes it from frame 2? This checks the assertions. I did not run D3D12 or observe stale content in PresentX.AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:21Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
69a49fa:cargo test -p victory-gpupasses, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
upstream-sync referenced this pull request2026-11-24 19:03:41 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:17:31Z.
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/host.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-11-25T20:11:44Z.
I strengthened the resize check and ran it on a GeForce RTX 4090 Laptop GPU (621.14). Frame 3 now has a 16×8 red corner on the 320×180 green back buffer. All four frames passed on two runs. When I disabled just the corner, the size still matched and the test failed at (0,0) with green instead of red. The test-only change is in Doffi4/VIctory#1, based on
69a49fa.Code and hardware testing assisted by Codex.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.