GPU tests: verify a synthetic frame through PresentX #1143

Open
github-bot wants to merge 3 commits from github-bot/gh-1143 into main AGit
Owner

@⁠Doffi4 on GitHub · 2026-11-24 16:11 UTC · original
Doffi4:test/synthetic-presentx → main · +411 −2 · 2 files · 3 commits · open

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.

cargo test --locked -p victory-gpu --features diagnostics synthetic_presentx -- --ignored --nocapture

AI-assisted testing

  • Windows 11 25H2 x64, Rust 1.98.1 MSVC, debug + diagnostics.
  • Radeon 780M (32.0.32029.2010), RTX 5060 Laptop (32.0.16.2101), WARP: 3 passes, zero skips or failures across the explicit runs. Four frames on each adapter. Every pixel matched at 384×216 (82,944 pixels) and 320×180 (57,600 pixels).
  • Regular diagnostics library suite: 53 passed, 2 ignored, 0 failed. Package Clippy with all features and targets and staged asset policy passed.
  • The test checks swap-chain content and DXGI return status. Desktop scanout, menus and world entry are outside its scope.
**@⁠Doffi4** on GitHub · 2026-11-24 16:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1143) `Doffi4:test/synthetic-presentx` → `main` · +411 −2 · 2 files · 3 commits · open 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. ```powershell cargo test --locked -p victory-gpu --features diagnostics synthetic_presentx -- --ignored --nocapture ``` ### AI-assisted testing - Windows 11 25H2 x64, Rust 1.98.1 MSVC, debug + diagnostics. - Radeon 780M (32.0.32029.2010), RTX 5060 Laptop (32.0.16.2101), WARP: 3 passes, zero skips or failures across the explicit runs. Four frames on each adapter. Every pixel matched at 384×216 (82,944 pixels) and 320×180 (57,600 pixels). - Regular diagnostics library suite: 53 passed, 2 ignored, 0 failed. Package Clippy with all features and targets and staged asset policy passed. - The test checks swap-chain content and DXGI return status. Desktop scanout, menus and world entry are outside its scope.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:21:00 +00:00
Author
Owner

@⁠Doffi4 on GitHub · 2026-11-24 16:18 UTC · original

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.

**@⁠Doffi4** on GitHub · 2026-11-24 16:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1143#issuecomment-7137437971) 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.
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 16:37 UTC · original

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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 16:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/1143#issuecomment-7137944285) 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.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:01 UTC · original

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-gpu passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1143#issuecomment-7140043094) 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-gpu` passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:17 UTC · original

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 current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/1143#issuecomment-7149397949) <!-- victory-triage v1 head=69a49fa212056be7d6fb2d965cfbc42e5b34e052 verdict=needs-rebase at=2026-11-25T01:17:30Z --> 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 current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠passerbyyhx on GitHub · 2026-11-25 20:11 UTC · original

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.

**@⁠passerbyyhx** on GitHub · 2026-11-25 20:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1143#issuecomment-7173318716) 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](https://github.com/Doffi4/VIctory/pull/1), based on `69a49fa`. Code and hardware testing assisted by Codex.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1143/head:github-bot/gh-1143'
git switch 'github-bot/gh-1143'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1143'
git switch 'github-bot/gh-1143'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1143'
git switch 'github-bot/gh-1143'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1143'
git switch 'main'
git merge --squash 'github-bot/gh-1143'
git switch 'main'
git merge --ff-only 'github-bot/gh-1143'
git switch 'main'
git merge 'github-bot/gh-1143'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1143
No description provided.