Tests: cover two-pass MS and ES+GS PSO hooks without game files #977

Open
github-bot wants to merge 1 commit from github-bot/gh-977 into main AGit
Owner

@⁠ChalanaGimhanaX on GitHub · 2026-11-24 09:48 UTC · original
ChalanaGimhanaX:tests/gpu-mesh-e2e → main · +489 −0 · 1 files · 1 commits · open

All two-pass mesh (MS) and legacy geometry (ES+GS) PSO hook tests in crates/xcl/tests/gpu_pso_e2e.rs skip when XCL_SAMPLE_RPF is unset, leaving translated_mesh_stream, own_stream, translated_gs_pso, and TwoPassPso without game-free GPU test coverage. This adds an integration test binary with minimal hand-encoded console MS/PS and ES/GS/PS containers that exercise both hooks end to end on the GPU. No runtime files or game data are touched.

What is in it

  • crates/xcl/tests/gpu_mesh_e2e.rs: two game-free GPU tests covering ID3D12Device2::CreatePipelineState on a console MS (NGG, hw=7, api=6) + console PS stream (cold XCL_DXIL_CACHE, stack stream + shader buffer overwrite proving own_stream deep copy, async stand-in resolution, two_pass_of kind == "MS", two-pass Dispatch + DispatchMesh execution with record and pixel readback, and two_pass_count cleanup on drop) and ID3D12Device::CreateGraphicsPipelineState on console VS (ES variant hw=2) + GS (hw=3, triangle to triangle-strip parallelogram expansion) + console PS (two_pass_of kind == "GS", two-pass GPU execution with strip winding and pixel readback inside both original and GS-generated triangles, and drop cleanup).

Tested

  • Hardware: AMD Ryzen 7 250, Windows 11 Pro build 26300, DXC 1.8.2502.11, rustc 1.100.0, debug build, tested on both GPUs on this machine:
    • AMD Radeon 780M Graphics (RDNA3, wave64 + mesh shaders, driver 32.0.21030.11004):
      • XCL_ADAPTER=radeon .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4): 718 passed, 0 failed, 41 ignored (0 GPU tests skipped)
      • XCL_ADAPTER=radeon XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --test gpu_mesh_e2e: 2 passed, 0 failed
      • XCL_ADAPTER=radeon XCL_SPLIT_WAVE64=1 cargo test -p xcl --test gpu_mesh_e2e: 2 passed, 0 failed
      • XCL_ADAPTER=radeon XCL_ASYNC_PSO=0 cargo test -p xcl --test gpu_mesh_e2e: 2 passed, 0 failed
      • XCL_ADAPTER=radeon cargo test -p xcl --test gpu_mesh_e2e -- --test-threads=1: 2 passed, 0 failed
    • 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): 718 passed, 0 failed, 41 ignored (2 GPU tests skipped: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64)
      • XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_mesh_e2e: 2 passed, 0 failed (also 2 passed under XCL_ASYNC_PSO=0)
    • WARP (XCL_ADAPTER=warp): cargo test -p xcl --test gpu_mesh_e2e: 2 passed (2 skipped: no wave64)
  • cargo clippy -p xcl --test gpu_mesh_e2e: 0 warnings in crates/xcl/tests/gpu_mesh_e2e.rs

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): wrote crates/xcl/tests/gpu_mesh_e2e.rs and this PR description, checked open PRs for overlap, and ran local dual-GPU verification on AMD Radeon 780M and NVIDIA RTX 5060 hardware.
**@⁠ChalanaGimhanaX** on GitHub · 2026-11-24 09:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/977) `ChalanaGimhanaX:tests/gpu-mesh-e2e` → `main` · +489 −0 · 1 files · 1 commits · open All two-pass mesh (`MS`) and legacy geometry (`ES+GS`) PSO hook tests in `crates/xcl/tests/gpu_pso_e2e.rs` skip when `XCL_SAMPLE_RPF` is unset, leaving `translated_mesh_stream`, `own_stream`, `translated_gs_pso`, and `TwoPassPso` without game-free GPU test coverage. This adds an integration test binary with minimal hand-encoded console MS/PS and ES/GS/PS containers that exercise both hooks end to end on the GPU. No runtime files or game data are touched. **What is in it** - `crates/xcl/tests/gpu_mesh_e2e.rs`: two game-free GPU tests covering `ID3D12Device2::CreatePipelineState` on a console MS (NGG, `hw=7, api=6`) + console PS stream (cold `XCL_DXIL_CACHE`, stack stream + shader buffer overwrite proving `own_stream` deep copy, async stand-in resolution, `two_pass_of` `kind == "MS"`, two-pass `Dispatch` + `DispatchMesh` execution with record and pixel readback, and `two_pass_count` cleanup on drop) and `ID3D12Device::CreateGraphicsPipelineState` on console VS (ES variant `hw=2`) + GS (`hw=3`, triangle to triangle-strip parallelogram expansion) + console PS (`two_pass_of` `kind == "GS"`, two-pass GPU execution with strip winding and pixel readback inside both original and GS-generated triangles, and drop cleanup). **Tested** - Hardware: AMD Ryzen 7 250, Windows 11 Pro build 26300, DXC 1.8.2502.11, `rustc 1.100.0`, debug build, tested on both GPUs on this machine: - **AMD Radeon 780M Graphics** (RDNA3, wave64 + mesh shaders, driver `32.0.21030.11004`): - `XCL_ADAPTER=radeon .\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`): 718 passed, 0 failed, 41 ignored (0 GPU tests skipped) - `XCL_ADAPTER=radeon XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --test gpu_mesh_e2e`: 2 passed, 0 failed - `XCL_ADAPTER=radeon XCL_SPLIT_WAVE64=1 cargo test -p xcl --test gpu_mesh_e2e`: 2 passed, 0 failed - `XCL_ADAPTER=radeon XCL_ASYNC_PSO=0 cargo test -p xcl --test gpu_mesh_e2e`: 2 passed, 0 failed - `XCL_ADAPTER=radeon cargo test -p xcl --test gpu_mesh_e2e -- --test-threads=1`: 2 passed, 0 failed - **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`): 718 passed, 0 failed, 41 ignored (2 GPU tests skipped: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64`) - `XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_mesh_e2e`: 2 passed, 0 failed (also 2 passed under `XCL_ASYNC_PSO=0`) - **WARP** (`XCL_ADAPTER=warp`): `cargo test -p xcl --test gpu_mesh_e2e`: 2 passed (2 skipped: `no wave64`) - `cargo clippy -p xcl --test gpu_mesh_e2e`: 0 warnings in `crates/xcl/tests/gpu_mesh_e2e.rs` **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): wrote `crates/xcl/tests/gpu_mesh_e2e.rs` and this PR description, checked open PRs for overlap, and ran local dual-GPU verification on AMD Radeon 780M and NVIDIA RTX 5060 hardware.
All mesh and legacy geometry PSO hook tests in gpu_pso_e2e.rs skip when
XCL_SAMPLE_RPF is unset. Add a game-free integration test binary using
hand-encoded console MS/PS and ES/GS/PS containers that verifies:

- ID3D12Device2::CreatePipelineState on a console MS + PS stream under a
  cold DXIL cache, deep-copying via own_stream (caller stack stream and
  shader buffers overwritten on return), async stand-in resolution,
  two-pass execution (Dispatch + DispatchMesh) with record and pixel
  readback, and two_pass_count cleanup on drop.
- ID3D12Device::CreateGraphicsPipelineState on console VS (ES variant) +
  GS (triangle to triangle-strip parallelogram expansion) + PS, two-pass
  execution with strip winding and pixel readback inside both original
  and GS-generated triangles, and two_pass_count cleanup on drop.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:54 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 13:51 UTC · original

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

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

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 13:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/977#issuecomment-7133440856) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - lib pso: 22 passed, 1 ignored, 0 failed. Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 05:38 UTC · original

Empirical test report (47fb4bb5)

Verified xcl-dev/xcl PR #977 at 47fb4bb5a831a02d9fce281c0da9f5f2d457c948.

Hardware / environment

  • Intel Arc A770 Graphics (16,258 MiB reported by XCL), Intel driver 32.0.101.9175, and AMD x64 CPU (family 23, model 113, stepping 0).
  • Windows x64 build 10.0.26200, rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5 (01b62ad4), and Cargo's unoptimized test profile with debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run completed outside the GPU lock with exit code 0.
  • Ran the resulting gpu_mesh_e2e-7490f57fced0e70c.exe --nocapture inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. The wrapper acquired and released the GPU lock. The fixture exited 0 after 1.74 s of test time.
  • Libtest reported 2 passed, 0 failed, 0 ignored. The captured output contained 0 SKIPPED lines, so both tests exercised their GPU assertions.

Observed behavior

  • console_es_gs_graphics_hook_executes_two_passes_and_cleans_up passed. The graphics PSO hook produced a compute pass and a mesh pass. GPU readback matched the expected strip record, including triangle winding, and pixels in both the original and generated triangles.
  • console_ms_ps_stream_hook_executes_two_passes_and_cleans_up passed. The cold-cache stream hook resolved the async stand-in after the fixture overwrote the caller's stream and shader bytes. GPU readback matched the records and expected pixels for both mesh groups.
  • Both fixtures verified that translation produced no additional fallback pipelines and that dropping the PSO released its two-pass entry. Both used synthetic shader containers.

Not tested

The full GPU workspace suite and game smoke runs were omitted. GPU execution was limited to the two fixtures on the Arc A770.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr977-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 05:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/977#issuecomment-7153991194) ### Empirical test report (47fb4bb5) Verified xcl-dev/xcl PR #977 at `47fb4bb5a831a02d9fce281c0da9f5f2d457c948`. **Hardware / environment** - Intel Arc A770 Graphics (16,258 MiB reported by XCL), Intel driver `32.0.101.9175`, and AMD x64 CPU (family 23, model 113, stepping 0). - Windows x64 build `10.0.26200`, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5 (01b62ad4)`, and Cargo's unoptimized test profile with debug info and incremental compilation disabled. **Commands and results** - `cargo test --workspace --no-run` completed outside the GPU lock with exit code 0. - Ran the resulting `gpu_mesh_e2e-7490f57fced0e70c.exe --nocapture` inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. The wrapper acquired and released the GPU lock. The fixture exited 0 after 1.74 s of test time. - Libtest reported **2 passed, 0 failed, 0 ignored**. The captured output contained **0 `SKIPPED` lines**, so both tests exercised their GPU assertions. **Observed behavior** - `console_es_gs_graphics_hook_executes_two_passes_and_cleans_up` passed. The graphics PSO hook produced a compute pass and a mesh pass. GPU readback matched the expected strip record, including triangle winding, and pixels in both the original and generated triangles. - `console_ms_ps_stream_hook_executes_two_passes_and_cleans_up` passed. The cold-cache stream hook resolved the async stand-in after the fixture overwrote the caller's stream and shader bytes. GPU readback matched the records and expected pixels for both mesh groups. - Both fixtures verified that translation produced no additional fallback pipelines and that dropping the PSO released its two-pass entry. Both used synthetic shader containers. **Not tested** The full GPU workspace suite and game smoke runs were omitted. GPU execution was limited to the two fixtures on the Arc A770. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr977-focused.log` and published.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:23 UTC · original

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

**@⁠DavidM1911** on GitHub · 2026-11-26 03:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/977#issuecomment-7181678034) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-977'
git switch 'github-bot/gh-977'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-977'
git switch 'github-bot/gh-977'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-977'
git switch 'main'
git merge --squash 'github-bot/gh-977'
git switch 'main'
git merge --ff-only 'github-bot/gh-977'
git switch 'main'
git merge 'github-bot/gh-977'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.