Tests: cover textured graphics PSOs and static samplers on the GPU #969

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

@⁠ChalanaGimhanaX on GitHub · 2026-11-24 09:40 UTC · original
ChalanaGimhanaX:tests/gpu-textured-draw-e2e → main · +394 −0 · 1 files · 1 commits · open

crates/xcl/tests/gpu_pso_e2e.rs skips its textured pipeline test whenever XCL_SAMPLE_RPF is unset, leaving textured graphics PSO translation, T#/S# descriptor decoding, multi-draw descriptor switching, and static sampler extraction without game-free GPU coverage on main. This adds an integration test binary with minimal hand-encoded console VS/PS containers exercising CreateGraphicsPipelineState end-to-end. No runtime files or game data are touched.

What is in it

  • crates/xcl/tests/gpu_textured_draw_e2e.rs: two synthetic GPU tests through CreateGraphicsPipelineState:
    • console_textured_ps_decoded_descriptors_and_switch_between_draws: console VS (POSITION + COLOR + TEXCOORD) + PS loading an 8-dword T# and dynamic 4-dword S# from s[8:9] and multiplying image_sample by vertex color; decodes two 64x64 linear RGBA8 T#s (identity and BGRA swizzle) via gpu::desc::{image, image_d3d12, sampler_d3d12}, checks translated_pipelines / fallback_pipelines, draws both halves in one command list via runner::draw_on_multi switching only s[8], and verifies all 4096 pixels.
    • console_ps_static_sampler_from_constants_in_abi_root_signature: console PS constructing two S# descriptors from SGPR constants (POINT + BORDER(opaque white) and LINEAR + WRAP); verifies static sampler extraction (compiled.samplers) and draws over u in [0, 2] with &[] dynamic samplers so sampling runs solely through the pipeline's ABI root signature static samplers.

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):
      • 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_textured_draw_e2e: 2 passed, 0 failed
      • XCL_ADAPTER=radeon XCL_SPLIT_WAVE64=1 cargo test -p xcl --test gpu_textured_draw_e2e: 2 passed, 0 failed
      • XCL_ADAPTER=radeon XCL_ASYNC_PSO=0 cargo test -p xcl --test gpu_textured_draw_e2e: 2 passed, 0 failed
      • Cold XCL_DXIL_CACHE run on radeon: 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 skips: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware — no wave64)
      • XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_textured_draw_e2e (default and XCL_ASYNC_PSO=0): 2 passed, 0 failed (0 skips)
    • WARP (XCL_ADAPTER=warp): 2 skipped cleanly (no wave64)
  • cargo clippy -p xcl --test gpu_textured_draw_e2e: 0 warnings/errors in gpu_textured_draw_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_textured_draw_e2e.rs and this PR description, checked open PRs for overlap, and ran local verification; all assertions and dual-GPU results verified on AMD Radeon 780M and NVIDIA RTX 5060 hardware.
**@⁠ChalanaGimhanaX** on GitHub · 2026-11-24 09:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/969) `ChalanaGimhanaX:tests/gpu-textured-draw-e2e` → `main` · +394 −0 · 1 files · 1 commits · open `crates/xcl/tests/gpu_pso_e2e.rs` skips its textured pipeline test whenever `XCL_SAMPLE_RPF` is unset, leaving textured graphics PSO translation, T#/S# descriptor decoding, multi-draw descriptor switching, and static sampler extraction without game-free GPU coverage on `main`. This adds an integration test binary with minimal hand-encoded console VS/PS containers exercising `CreateGraphicsPipelineState` end-to-end. No runtime files or game data are touched. **What is in it** - `crates/xcl/tests/gpu_textured_draw_e2e.rs`: two synthetic GPU tests through `CreateGraphicsPipelineState`: - `console_textured_ps_decoded_descriptors_and_switch_between_draws`: console VS (`POSITION` + `COLOR` + `TEXCOORD`) + PS loading an 8-dword T# and dynamic 4-dword S# from `s[8:9]` and multiplying `image_sample` by vertex color; decodes two 64x64 linear RGBA8 T#s (identity and BGRA swizzle) via `gpu::desc::{image, image_d3d12, sampler_d3d12}`, checks `translated_pipelines` / `fallback_pipelines`, draws both halves in one command list via `runner::draw_on_multi` switching only `s[8]`, and verifies all 4096 pixels. - `console_ps_static_sampler_from_constants_in_abi_root_signature`: console PS constructing two S# descriptors from SGPR constants (`POINT + BORDER(opaque white)` and `LINEAR + WRAP`); verifies static sampler extraction (`compiled.samplers`) and draws over `u in [0, 2]` with `&[]` dynamic samplers so sampling runs solely through the pipeline's ABI root signature static samplers. **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`): - `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_textured_draw_e2e`: 2 passed, 0 failed - `XCL_ADAPTER=radeon XCL_SPLIT_WAVE64=1 cargo test -p xcl --test gpu_textured_draw_e2e`: 2 passed, 0 failed - `XCL_ADAPTER=radeon XCL_ASYNC_PSO=0 cargo test -p xcl --test gpu_textured_draw_e2e`: 2 passed, 0 failed - Cold `XCL_DXIL_CACHE` run on `radeon`: 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 skips: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` — `no wave64`) - `XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_textured_draw_e2e` (default and `XCL_ASYNC_PSO=0`): 2 passed, 0 failed (0 skips) - **WARP** (`XCL_ADAPTER=warp`): 2 skipped cleanly (`no wave64`) - `cargo clippy -p xcl --test gpu_textured_draw_e2e`: 0 warnings/errors in `gpu_textured_draw_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_textured_draw_e2e.rs` and this PR description, checked open PRs for overlap, and ran local verification; all assertions and dual-GPU results verified on AMD Radeon 780M and NVIDIA RTX 5060 hardware.
gpu_pso_e2e.rs skips textured pipeline coverage whenever XCL_SAMPLE_RPF is unset. Add a game-free integration test binary with hand-encoded console VS/PS containers exercising CreateGraphicsPipelineState: decoded console T# and dynamic S# descriptors with per-draw user-SGPR table switching and BGRA swizzle in one command list, plus static sampler extraction from SGPR constants into the ABI root signature with zero dynamic samplers bound.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:41 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-24 10:16 UTC · original · edited 2026-11-24 10:21 UTC

Ran both new tests at 23eb733 on a second Blackwell part (wave32 only).

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_textured_draw_e2e
2 passed; 0 failed; 0 ignored      (exit 0)

The textured PS path and the static sampler from the ABI root signature both render and read back correctly here. This adds an RTX 5070 Ti / driver 32.0.16.2124 datapoint next to the PR's RTX 5060 Laptop run, on Windows 11 build 26200.

Not tested: RDNA2/RDNA4 and Intel GPUs, Wine, the D3D12 debug-layer path for this test, 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 binaries, wrote this report; the worktree was not modified.

**@⁠Aniseto** on GitHub · 2026-11-24 10:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/969#issuecomment-7128555349) · edited 2026-11-24 10:21 UTC Ran both new tests at `23eb733` on a second Blackwell part (wave32 only). Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=nvidia cargo test -p xcl --test gpu_textured_draw_e2e 2 passed; 0 failed; 0 ignored (exit 0) ``` The textured PS path and the static sampler from the ABI root signature both render and read back correctly here. This adds an RTX 5070 Ti / driver 32.0.16.2124 datapoint next to the PR's RTX 5060 Laptop run, on Windows 11 build 26200. Not tested: RDNA2/RDNA4 and Intel GPUs, Wine, the D3D12 debug-layer path for this test, 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 binaries, wrote this report; the worktree was not modified.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 10:38 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head 23eb733 onto main 6bac4b4, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 710 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). textured-graphics-PSO/static-sampler test coverage green on RDNA3 wave64.

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.

**@⁠SlopTart** on GitHub · 2026-11-24 10:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/969#issuecomment-7129046746) Linux / AMD RDNA3 datapoint. **Merged state:** head `23eb733` onto main `6bac4b4`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **710 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). textured-graphics-PSO/static-sampler test coverage green on RDNA3 wave64. **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.
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/969#issuecomment-7133438677) 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 (23eb733a)

Verified xcl-dev/xcl PR #969 at commit 23eb733a0faf096ff22ab0294564cb58516eae6e in a clean, detached worktree.

Hardware / environment

  • Intel Arc A770 (16,258 MiB reported by DXGI), confirmed by the real D3D12 backend in both fixtures. Windows x64 build 26200 on AMD64 Family 23 Model 113.
  • Rust 1.100.0 (0ef1bc386 2026-11-09). DXC 1.9.2609.5 (01b62ad47). Unoptimized Cargo test profile, debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run exited 0 outside the GPU lock.
  • Invoke-ArcTest.ps1 -Test { & $fixture } ran the built gpu_textured_draw_e2e test executable with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Exit 0 in the lock wrapper. The test harness reported 2 passed, 0 failed, 0 ignored, and the complete captured output contained 0 SKIPPED lines. Harness time was 2.97 s.

Observed behavior

  • console_textured_ps_decoded_descriptors_and_switch_between_draws passed its pixel readback checks for decoded texture and dynamic sampler descriptors, switching the descriptor table between two draws in one command list, and BGRA swizzle on the right half.
  • console_ps_static_sampler_from_constants_in_abi_root_signature passed its static-sampler extraction and pixel readback checks for point filtering with an opaque white border and linear filtering with wrap, with zero dynamic samplers supplied.
  • Both fixtures passed their translated graphics PSO and fallback-count assertions.

Not tested

The full GPU workspace suite and game smoke runs were omitted. Coverage is limited to the two synthetic 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 pr969-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 05:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/969#issuecomment-7153992999) ### Empirical test report (23eb733a) Verified xcl-dev/xcl PR #969 at commit `23eb733a0faf096ff22ab0294564cb58516eae6e` in a clean, detached worktree. **Hardware / environment** - Intel Arc A770 (16,258 MiB reported by DXGI), confirmed by the real D3D12 backend in both fixtures. Windows x64 build 26200 on AMD64 Family 23 Model 113. - Rust `1.100.0 (0ef1bc386 2026-11-09)`. DXC `1.9.2609.5 (01b62ad47)`. Unoptimized Cargo test profile, debug info and incremental compilation disabled. **Commands and results** - `cargo test --workspace --no-run` exited 0 outside the GPU lock. - `Invoke-ArcTest.ps1 -Test { & $fixture }` ran the built `gpu_textured_draw_e2e` test executable with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Exit 0 in the lock wrapper. The test harness reported **2 passed, 0 failed, 0 ignored**, and the complete captured output contained **0 `SKIPPED` lines**. Harness time was 2.97 s. **Observed behavior** - `console_textured_ps_decoded_descriptors_and_switch_between_draws` passed its pixel readback checks for decoded texture and dynamic sampler descriptors, switching the descriptor table between two draws in one command list, and BGRA swizzle on the right half. - `console_ps_static_sampler_from_constants_in_abi_root_signature` passed its static-sampler extraction and pixel readback checks for point filtering with an opaque white border and linear filtering with wrap, with zero dynamic samplers supplied. - Both fixtures passed their translated graphics PSO and fallback-count assertions. **Not tested** The full GPU workspace suite and game smoke runs were omitted. Coverage is limited to the two synthetic 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 `pr969-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/969#issuecomment-7181676392) 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/969/head:github-bot/gh-969'
git switch 'github-bot/gh-969'

Merge

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