Skip to content

Tests: cover image_get_lod static samplers on GPU - #1861

Open
Flyander wants to merge 1 commit into
xcl-dev:mainfrom
Flyander:codex/test-image-get-lod-static-sampler
Open

Flyander wants to merge 1 commit into
xcl-dev:mainfrom
Flyander:codex/test-image-get-lod-static-sampler

Conversation

@Flyander

Copy link
Copy Markdown

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
Flyander marked this pull request as ready for review November 24, 2026 22:09
@upipibi

upipibi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

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.

AI-assisted (Claude Code). Synthetic tests only.

@DarkPanda69

Copy link
Copy Markdown

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@JJAutoCompare

Copy link
Copy Markdown

Tested

  • XCL PR Tests: cover image_get_lod static samplers on GPU #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.

@raylitebull

Copy link
Copy Markdown
Member

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.

@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants