Tests: cover image_get_lod static samplers on GPU #1861

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

@⁠Flyander on GitHub · 2026-11-24 22:04 UTC · original
Flyander:codex/test-image-get-lod-static-sampler → main · +117 −4 · 2 files · 1 commits · open

Part of #1269. Adds real GPU regression coverage for the static-sampler image_get_lod path merged in #1806.

What is in it

  • crates/xcl/src/gpu/recomp/runner.rs: let the pixel-draw test harness build a root signature with static samplers.
  • crates/xcl/src/gpu/recomp/tests.rs: translate a synthetic IMAGE_GET_LOD pixel shader, draw it, and check the clamped LOD 0 and unclamped LOD -2 results.

Tested

  • RTX 5070 Ti (driver 621.40), Ryzen 7 5800X3D, Windows 11 Pro 26300, Rust 1.100.0, DXC/DXIL 1.9.2602.17.
  • cargo test --locked -p xcl --lib gpu_direct_image_get_lod_static_sampler -- --nocapture --test-threads=1: 1 passed, 0 failed.
  • scripts/test.ps1 (cargo build --workspace, cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored; 22 GPU tests skipped (wave64, heap-window, or unsupported translator semantics).

Regression run

main:

xcl-smoke v1
commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA6-Xbox-v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 983 (PresentX 983)
presents per 2 s (last 3): 54 59 60
device removals: 0
crashes: 0
peak commit: 16039 MB

PR head:

xcl-smoke v1
commit: 14dc4456dc3876020daff223fe844561c617c0c4
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA6-Xbox-v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1088 (PresentX 1089)
presents per 2 s (last 3): 58 55 35
device removals: 0
crashes: 0
peak commit: 16516 MB

Not tested

  • AMD / Intel GPUs.
  • Whether the retail title uses this specific static-sampler shader path; the smoke is a stability comparison.

AI use

  • Omitted.
**@⁠Flyander** on GitHub · 2026-11-24 22:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1861) `Flyander:codex/test-image-get-lod-static-sampler` → `main` · +117 −4 · 2 files · 1 commits · open Part of #1269. Adds real GPU regression coverage for the static-sampler `image_get_lod` path merged in #1806. **What is in it** - `crates/xcl/src/gpu/recomp/runner.rs`: let the pixel-draw test harness build a root signature with static samplers. - `crates/xcl/src/gpu/recomp/tests.rs`: translate a synthetic `IMAGE_GET_LOD` pixel shader, draw it, and check the clamped LOD 0 and unclamped LOD -2 results. **Tested** - RTX 5070 Ti (driver 621.40), Ryzen 7 5800X3D, Windows 11 Pro 26300, Rust 1.100.0, DXC/DXIL 1.9.2602.17. - `cargo test --locked -p xcl --lib gpu_direct_image_get_lod_static_sampler -- --nocapture --test-threads=1`: 1 passed, 0 failed. - `scripts/test.ps1` (`cargo build --workspace`, `cargo test --workspace -- --test-threads=4`): 960 passed, 0 failed, 43 ignored; 22 GPU tests skipped (wave64, heap-window, or unsupported translator semantics). **Regression run** `main`: ``` xcl-smoke v1 commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA6-Xbox-v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 983 (PresentX 983) presents per 2 s (last 3): 54 59 60 device removals: 0 crashes: 0 peak commit: 16039 MB ``` PR head: ``` xcl-smoke v1 commit: 14dc4456dc3876020daff223fe844561c617c0c4 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA6-Xbox-v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1088 (PresentX 1089) presents per 2 s (last 3): 58 55 35 device removals: 0 crashes: 0 peak commit: 16516 MB ``` **Not tested** - AMD / Intel GPUs. - Whether the retail title uses this specific static-sampler shader path; the smoke is a stability comparison. **AI use** - Omitted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:07:32 +00:00
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-24 22:40 UTC · original

AMD run, which this PR lists as not tested (the other report here is Ampere).

Tested: pass, head 14dc445 applied on main 689f2db, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
cargo test -p xcl --lib -- gpu::recomp --test-threads=4:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, native wave64: 262 passed, 0 failed, 18 ignored. gpu_direct_image_get_lod_static_sampler ok. The 6 SKIPPED lines (per-lane form refused for some f16/f32 programs) are the same on main.
  • NVIDIA RTX 3060, driver 32.0.16.1088: 262 passed, 0 failed, 18 ignored. Same test ok.

Not tested: Intel; the whole workspace suite.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-24 22:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1861#issuecomment-7146506522) AMD run, which this PR lists as not tested (the other report here is Ampere). **Tested:** pass, head `14dc445` applied on `main` `689f2db`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --lib -- gpu::recomp --test-threads=4`: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, native wave64: 262 passed, 0 failed, 18 ignored. `gpu_direct_image_get_lod_static_sampler` ok. The 6 SKIPPED lines (per-lane form refused for some f16/f32 programs) are the same on `main`. - NVIDIA RTX 3060, driver 32.0.16.1088: 262 passed, 0 failed, 18 ignored. Same test ok. **Not tested:** Intel; the whole workspace suite. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 01:38 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 01:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1861#issuecomment-7149783430) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

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

Tested

  • XCL PR #1861 at 14dc4456dc3876020daff223fe844561c617c0c4. The live PR was open at this head before and after the run. The reused detached checkout matched the SHA and was clean both times.
  • Intel Arc A770, driver 32.0.101.9175, AMD Ryzen 7 3800X (6 cores / 12 logical processors exposed), Windows 11 Enterprise Evaluation 26200.9974, Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc). The run log confirms DXC and DXIL 1.9.2609.5 loaded from the explicit XCL_DXC_DIR below.
  • The exact synthetic draw passed in 0.70 s with 1 passed, 0 failed, 0 ignored, 0 skipped (933 filtered out). It drew with the direct DXIL pixel shader and its root-signature static sampler. GPU readback passed both assertions at every pixel of the 16 × 16 render target. The red channel, clamped LOD, was within < 0.02 of 0.0. The green channel, unclamped LOD, was within < 0.02 of -2.0. The passing fixture emits no raw channel values, so the run establishes those bounds and does not establish bit-exact values.
$run = 'L:/XclTooling/pr1861/run-20261125T031606102Z'
$env:TEMP = Join-Path $run 'temp'
$env:TMP = $env:TEMP
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr2014-1c971de6/target'
$env:CARGO_BUILD_JOBS = '2'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = "$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64"
$env:XCL_DXIL_CACHE = Join-Path $run 'dxil-cache'
cargo test --locked -p xcl --lib --no-run --message-format=json
$env:XCL_PR1861_TEST_EXE = 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command '& ''L:/XclTooling/Invoke-ArcTest.ps1'' -Test { & $env:XCL_PR1861_TEST_EXE ''gpu::recomp::tests::gpu_direct_image_get_lod_static_sampler'' --exact --nocapture --test-threads=1 }; exit $LASTEXITCODE'

The prebuild finished outside the mutex. The wrapper acquired and released the Arc mutex around the test executable, which exited 0. RemoteSigned applied only to the child PowerShell process. Captured logs are prebuild.jsonl, prebuild.stderr.log, gpu.stdout.log, and gpu.stderr.log in the run directory.

Not tested

Repeat-draw bitwise determinism, HLSL pixel-shader parity, other adapters or drivers, retail titles, smoke runs, or the wider suite.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the checked-in test and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/1861#issuecomment-7151816370) **Tested** - XCL PR #1861 at `14dc4456dc3876020daff223fe844561c617c0c4`. The live PR was open at this head before and after the run. The reused detached checkout matched the SHA and was clean both times. - Intel Arc A770, driver `32.0.101.9175`, AMD Ryzen 7 3800X (6 cores / 12 logical processors exposed), Windows 11 Enterprise Evaluation `26200.9974`, Rust and Cargo `1.100.0` (`x86_64-pc-windows-msvc`). The run log confirms DXC and DXIL `1.9.2609.5` loaded from the explicit `XCL_DXC_DIR` below. - The exact synthetic draw passed in 0.70 s with **1 passed, 0 failed, 0 ignored, 0 skipped** (933 filtered out). It drew with the direct DXIL pixel shader and its root-signature static sampler. GPU readback passed both assertions at every pixel of the 16 × 16 render target. The red channel, clamped LOD, was within `< 0.02` of `0.0`. The green channel, unclamped LOD, was within `< 0.02` of `-2.0`. The passing fixture emits no raw channel values, so the run establishes those bounds and does not establish bit-exact values. ```powershell $run = 'L:/XclTooling/pr1861/run-20261125T031606102Z' $env:TEMP = Join-Path $run 'temp' $env:TMP = $env:TEMP $env:CARGO_TARGET_DIR = 'L:/XclTooling/pr2014-1c971de6/target' $env:CARGO_BUILD_JOBS = '2' $env:CARGO_INCREMENTAL = '0' $env:CARGO_PROFILE_DEV_DEBUG = '0' $env:CARGO_PROFILE_TEST_DEBUG = '0' $env:XCL_ADAPTER = 'A770' $env:XCL_DXC_DIR = "$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64" $env:XCL_DXIL_CACHE = Join-Path $run 'dxil-cache' cargo test --locked -p xcl --lib --no-run --message-format=json $env:XCL_PR1861_TEST_EXE = 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' powershell.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command '& ''L:/XclTooling/Invoke-ArcTest.ps1'' -Test { & $env:XCL_PR1861_TEST_EXE ''gpu::recomp::tests::gpu_direct_image_get_lod_static_sampler'' --exact --nocapture --test-threads=1 }; exit $LASTEXITCODE' ``` The prebuild finished outside the mutex. The wrapper acquired and released the Arc mutex around the test executable, which exited `0`. `RemoteSigned` applied only to the child PowerShell process. Captured logs are `prebuild.jsonl`, `prebuild.stderr.log`, `gpu.stdout.log`, and `gpu.stderr.log` in the run directory. **Not tested** Repeat-draw bitwise determinism, HLSL pixel-shader parity, other adapters or drivers, retail titles, smoke runs, or the wider suite. **AI use** T3 Code / Codex (`gpt-6.2-sol`) ran the checked-in test and wrote this report.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:46 UTC · original

Diff review on 14dc445 looks clean, and gpu_direct_image_get_lod_static_sampler has both NVIDIA (@upipibi, @DavidM1911) and AMD (@DarkPanda69) passes.

One small CI fix needed before merge: CI 45497463897 failed in gpu_direct_image_get_lod_static_sampler with D3D12 device removed (0x887a0005) on WARP because the new test only guards runner::adapter().is_err() instead of !gpu_ready() (which in crates/xcl/src/gpu/recomp/tests.rs also checks wave64_programs_supported() and dxc::location() so WARP skips cleanly). Switching that guard to if !gpu_ready() { return; } should make CI green.

**@⁠raylitebull** on GitHub · 2026-11-25 10:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1861#issuecomment-7160160473) Diff review on `14dc445` looks clean, and `gpu_direct_image_get_lod_static_sampler` has both NVIDIA (`@upipibi`, `@DavidM1911`) and AMD (`@DarkPanda69`) passes. One small CI fix needed before merge: CI `45497463897` failed in `gpu_direct_image_get_lod_static_sampler` with `D3D12 device removed (0x887a0005)` on WARP because the new test only guards `runner::adapter().is_err()` instead of `!gpu_ready()` (which in `crates/xcl/src/gpu/recomp/tests.rs` also checks `wave64_programs_supported()` and `dxc::location()` so WARP skips cleanly). Switching that guard to `if !gpu_ready() { return; }` should make CI green.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 22:21 UTC · original · edited 2026-11-25 16:42 UTC

Same on Ampere: RTX 3070 8 GB, driver 616.56, Windows 11, debug, 14dc445 merged onto main 689f2db. gpu_direct_image_get_lod_static_sampler passes 2 of 2 runs, both with and without XCL_DIRECT_DXIL=1.


Added 16:42Z: whole workspace on this head, as is (base 1d027e5), RTX 3070 (616.56), Windows 11, debug, after cargo build --workspace, cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2:

  • 14dc445: 951 passed, 0 failed, 43 ignored. The end-to-end title tests pass.
  • main 0829441 on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR doesn't touch it.
  • SKIPPED lines: 23: 18 no wave64 on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off.

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-24 22:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/1861#issuecomment-7146138793) · edited 2026-11-25 16:42 UTC Same on Ampere: RTX 3070 8 GB, driver 616.56, Windows 11, debug, `14dc445` merged onto `main` `689f2db`. `gpu_direct_image_get_lod_static_sampler` passes 2 of 2 runs, both with and without `XCL_DIRECT_DXIL=1`. --- **Added 16:42Z: whole workspace on this head, as is** (base `1d027e5`), RTX 3070 (616.56), Windows 11, debug, after `cargo build --workspace`, `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: - `14dc445`: **951 passed, 0 failed, 43 ignored**. The end-to-end title tests pass. - `main` `0829441` on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests). - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR doesn't touch it. - SKIPPED lines: 23: 18 `no wave64` on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/recomp/tests.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/1861/head:github-bot/gh-1861'
git switch 'github-bot/gh-1861'

Merge

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