Tests: cover graphics PSO hooks on the GPU without game files #935

Open
ChalanaGimhanaX wants to merge 1 commit from upstream-pr/941 into main
ChalanaGimhanaX commented 2026-11-24 09:00:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ChalanaGimhanaX on 2026-11-24T09:00:44Z.


Every GPU test in crates/xcl/tests/gpu_pso_e2e.rs skips when XCL_SAMPLE_RPF is unset, so the D3D12.X graphics pipeline hooks have no game-free GPU coverage on main. This adds an integration test binary mirroring gpu_compute_e2e.rs with minimal hand-encoded console VS/PS containers. No runtime files or game data are touched.

What is in it

  • crates/xcl/tests/gpu_graphics_e2e.rs: four synthetic GPU tests covering CreateGraphicsPipelineState (VS user-SGPR descriptor load + PS discard/interpolation, rect-list topology 19 rect_list_gs expansion, cold-cache async stand-in resolution and drop cleanup) and ID3D12Device2::CreatePipelineState (console graphics stream routing and E_INVALIDARG refusal of an MS container in the AS slot).

Tested

  • Hardware: AMD Ryzen 7 250, Windows 11 Pro build 26300, DXC 1.8.2502.11, rustc 1.100.0 (0ef1bc386 2026-11-09), debug build, tested on both GPUs on this machine:
    • AMD Radeon 780M Graphics (RDNA3, wave64 + mesh shaders, driver 32.0.21030.11004):
      • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4): 720 passed, 0 failed, 41 ignored (0 GPU skips; 2 debug-layer tests skipped because d3d12SDKLayers.dll is not installed)
      • XCL_ADAPTER=radeon XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --test gpu_graphics_e2e: 4 passed, 0 failed
      • XCL_SPLIT_WAVE64=1 cargo test -p xcl --test gpu_graphics_e2e: 4 passed, 0 failed
      • XCL_ASYNC_PSO=0 cargo test -p xcl --test gpu_graphics_e2e: 4 passed, 0 failed (1 skipped: async_graphics_pso_registers_real_pso_and_cleans_up_on_drop)
    • NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell, wave32 + mesh shaders, driver 610.88 / 32.0.16.1088):
      • XCL_ADAPTER=nvidia .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4): 720 passed, 0 failed, 41 ignored (2 GPU skips: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware — no wave64; plus the 2 debug-layer skips)
      • XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_graphics_e2e: 4 passed, 0 failed (0 skips)

Not tested

  • Intel GPUs, RDNA2/RDNA4 discrete GPUs, Wine / vkd3d-proton
  • D3D12 debug layer (d3d12SDKLayers.dll not installed) and optional XCL_SAMPLE_* retail-data tests

AI use

  • Antigravity (Gemini 4 Neon): drafted the test binary and PR description, checked open PRs for overlap, and ran the local test suite; all assertions and dual-GPU results verified on AMD Radeon 780M and NVIDIA RTX 5060 hardware.
<!-- greyfinch-sync:ivall/xcl:issue:5469125336 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/941). Originally posted by [ChalanaGimhanaX](https://github.com/ChalanaGimhanaX) on 2026-11-24T09:00:44Z. --- Every GPU test in `crates/xcl/tests/gpu_pso_e2e.rs` skips when `XCL_SAMPLE_RPF` is unset, so the D3D12.X graphics pipeline hooks have no game-free GPU coverage on `main`. This adds an integration test binary mirroring `gpu_compute_e2e.rs` with minimal hand-encoded console VS/PS containers. No runtime files or game data are touched. **What is in it** - `crates/xcl/tests/gpu_graphics_e2e.rs`: four synthetic GPU tests covering `CreateGraphicsPipelineState` (VS user-SGPR descriptor load + PS discard/interpolation, rect-list topology 19 `rect_list_gs` expansion, cold-cache async stand-in resolution and drop cleanup) and `ID3D12Device2::CreatePipelineState` (console graphics stream routing and `E_INVALIDARG` refusal of an MS container in the AS slot). **Tested** - Hardware: AMD Ryzen 7 250, Windows 11 Pro build 26300, DXC 1.8.2502.11, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug build, tested on both GPUs on this machine: - **AMD Radeon 780M Graphics** (RDNA3, wave64 + mesh shaders, driver `32.0.21030.11004`): - `.\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`): 720 passed, 0 failed, 41 ignored (0 GPU skips; 2 debug-layer tests skipped because `d3d12SDKLayers.dll` is not installed) - `XCL_ADAPTER=radeon XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --test gpu_graphics_e2e`: 4 passed, 0 failed - `XCL_SPLIT_WAVE64=1 cargo test -p xcl --test gpu_graphics_e2e`: 4 passed, 0 failed - `XCL_ASYNC_PSO=0 cargo test -p xcl --test gpu_graphics_e2e`: 4 passed, 0 failed (1 skipped: `async_graphics_pso_registers_real_pso_and_cleans_up_on_drop`) - **NVIDIA GeForce RTX 5060 Laptop GPU** (Blackwell, wave32 + mesh shaders, driver `610.88` / `32.0.16.1088`): - `XCL_ADAPTER=nvidia .\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`): 720 passed, 0 failed, 41 ignored (2 GPU skips: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` — `no wave64`; plus the 2 debug-layer skips) - `XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_graphics_e2e`: 4 passed, 0 failed (0 skips) **Not tested** - Intel GPUs, RDNA2/RDNA4 discrete GPUs, Wine / vkd3d-proton - D3D12 debug layer (`d3d12SDKLayers.dll` not installed) and optional `XCL_SAMPLE_*` retail-data tests **AI use** - Antigravity (Gemini 4 Neon): drafted the test binary and PR description, checked open PRs for overlap, and ran the local test suite; all assertions and dual-GPU results verified on AMD Radeon 780M and NVIDIA RTX 5060 hardware.
dcastell1 commented 2026-11-24 10:04:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T09:11:10Z.


Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean main@beaa245 (713 passed, 0 failed, 41 ignored on this box):

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
717 passed; 0 failed; 41 ignored   (exit 0)

Four more passing tests than main; the graphics PSO hook coverage runs on this GPU without game files, which is what it was written for.

Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

<!-- greyfinch-sync:ivall/xcl:comment:7127070439 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/941#issuecomment-7127070439). Originally posted by [dcastell1](https://github.com/dcastell1) on 2026-11-24T09:11:10Z. --- Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean `main@beaa245` (713 passed, 0 failed, 41 ignored on this box): ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 717 passed; 0 failed; 41 ignored (exit 0) ``` Four more passing tests than main; the graphics PSO hook coverage runs on this GPU without game files, which is what it was written for. Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Aniseto commented 2026-11-24 10:04:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-24T09:42:42Z.


Verified on Windows 11 Pro build 26200, NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2124, wave32 only), Intel Core i5-12400F, 64 GB RAM, Rust 1.100.0 MSVC 14.44.35207, DXC 1.9.2609.5, debug build, on 91ca6ce (detached worktree from refs/pull/941/head):

XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_graphics_e2e
4 passed, 0 failed, 0 ignored, 0 skipped      (exit 0)

The graphics PSO hook coverage runs on this GPU without game files, which is what it was written for.

Tree untouched afterwards (git status clean, no local changes), hardware adapter, no Wine, no game data. Not tested: Intel GPUs, RDNA2/RDNA4, optional XCL_SAMPLE_* retail-data tests.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.

<!-- greyfinch-sync:ivall/xcl:comment:7127783466 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/941#issuecomment-7127783466). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-24T09:42:42Z. --- Verified on Windows 11 Pro build 26200, NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2124, wave32 only), Intel Core i5-12400F, 64 GB RAM, Rust 1.100.0 MSVC 14.44.35207, DXC 1.9.2609.5, debug build, on `91ca6ce` (detached worktree from `refs/pull/941/head`): ``` XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_graphics_e2e 4 passed, 0 failed, 0 ignored, 0 skipped (exit 0) ``` The graphics PSO hook coverage runs on this GPU without game files, which is what it was written for. Tree untouched afterwards (git status clean, no local changes), hardware adapter, no Wine, no game data. Not tested: Intel GPUs, RDNA2/RDNA4, optional `XCL_SAMPLE_*` retail-data tests. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.
SlopTart commented 2026-11-24 11:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T10:37:52Z.


Linux / AMD RDNA3 datapoint.

Merged state: head 91ca6ce onto main 9aec53d, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 717 passed, 11 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). GPU graphics-PSO hooks tests green.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7129036440 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/941#issuecomment-7129036440). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T10:37:52Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `91ca6ce` onto main `9aec53d`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **717 passed, 11 failed, 41 ignored**; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). GPU graphics-PSO hooks tests green. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
DavidM1911 commented 2026-11-24 14:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:51:23Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • lib pso: 22 passed, 1 ignored, 0 failed.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7133438134 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/941#issuecomment-7133438134). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:51:23Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - lib pso: 22 passed, 1 ignored, 0 failed. Thanks!
DavidM1911 commented 2026-11-26 04:07:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:11:26Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7181476676 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/941#issuecomment-7181476676). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:11:26Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
github-actions[bot] commented 2026-11-30 08:41:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:41:48Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273229009 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/941#issuecomment-7273229009). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:41:48Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:32:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:32:13Z.


Triage (#1607) – head 91ca6ce

No open or merged PR makes the same change. Main's gpu_pso_e2e.rs covers the same hooks only with retail sample-pack shaders (XCL_SAMPLE_*). This file builds console containers by hand, so it runs without game files. #1921 tests the pipeline hooks with host DXBC shaders, not console containers. #969, by the same author, covers textured PSOs in a separate file and duplicates the container helpers (console_shader, sig_part, le). The shared lines with #896 are only that boilerplate.
All the APIs it calls (real::is_translated_graphics, has_rect_list_gs, pso_async::resolve_wait, runner::draw_on) exist on main. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300833515 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/941#issuecomment-7300833515). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:32:13Z. --- **Triage (#1607)** – head 91ca6ce No open or merged PR makes the same change. Main's `gpu_pso_e2e.rs` covers the same hooks only with retail sample-pack shaders (`XCL_SAMPLE_*`). This file builds console containers by hand, so it runs without game files. #1921 tests the pipeline hooks with host DXBC shaders, not console containers. #969, by the same author, covers textured PSOs in a separate file and duplicates the container helpers (`console_shader`, `sig_part`, `le`). The shared lines with #896 are only that boilerplate. All the APIs it calls (`real::is_translated_graphics`, `has_rect_list_gs`, `pso_async::resolve_wait`, `runner::draw_on`) exist on main. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/941:upstream-pr/941'
git switch 'upstream-pr/941'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/941'
git switch 'upstream-pr/941'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/941'
git switch 'upstream-pr/941'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/941'
git switch 'main'
git merge --squash 'upstream-pr/941'
git switch 'main'
git merge --ff-only 'upstream-pr/941'
git switch 'main'
git merge 'upstream-pr/941'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!935
No description provided.