Tests: add direct DXIL vs HLSL GPU parity suite for MIMG image ops #2276
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2276
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2276"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Vadson159 on GitHub · 2026-11-25 12:02 UTC · original
Vadson159:tests/gpu-dxil-image-sampling-parity→main· +452 −0 · 1 files · 1 commits · openAdd GPU differential parity tests in
crates/xcl/tests/gpu_dxil_image_sampling_parity.rscomparing the direct RDNA2-to-DXIL translator (xcl::gpu::dxil::kernel::translate_full, validated viadxil.dll) against the HLSL + DXC path (xcl::gpu::recomp::translate+dxc::compile) forlower_image.rsMIMG operations acrosswave32,split-wave64, andnative-wave64modes where supported.What is in it
direct_dxil_image_sample_dimensions_cube_offset_and_unorm_parity: tests 1DArray, 2D (sample_l_owith signed 6-bit texel offsets), 2DArray (layer rounding), 3D (sample_dexplicit gradients), CubeArray (face + 8 * cube), depth comparisonsample_c_lzonDXGI_FORMAT_R32_FLOAT,A16/D16packing, and direct-DXIL-only non-cubeUNORM=1sampling (verifying HLSL reports"MIMG unorm"unsupported).direct_dxil_image_gather4_lod_and_sampler_rules_parity: testsimage_gather4_lz_o,image_gather4_l,image_gather4_l_o, andimage_gather4_c_l(R32_FLOAT,A16/D16) across RGBA channels, plus direct-DXILmimg_gather4_lodS# border white, wrap/mirror addressing, andUNORM=1.direct_dxil_image_load_mip_store_resinfo_and_d16_parity: testsimage_load,image_load_mip,image_store, andimage_get_resinfoacross 1DArray/2D/2DArray/3D/Cube dimensions, typedSINT/FLOAT,D16packing, partialDMASK, and partialEXECmasking.direct_dxil_image_atomics_and_descriptor_guard_parity: tests 32-bit float/CASimage_atomic_*(fmin,fmax,fcmpswapwith-0.0 == +0.0,subwithGLC=0,dec) and T# descriptor-heap guards (null type< 8, non-zerotw1[7:0], andtw0 >= GLOBAL_MAX - 1).Tested
32.0.32029.2010), AMD Radeon(TM) Graphics iGPU (driver32.0.21045.29003), AMD Ryzen 7 9800X3D 8-Core Processor, Windows, DXC1.8.2502.11,rustc 1.100.0 (0ef1bc386 2026-11-09), debug build.cargo test -p xcl --test gpu_dxil_image_sampling_parity -- --nocapture --test-threads=1(AMD Radeon RX 9070 XT): 4 passed, 0 failed, 0 ignored.cargo build --workspace; cargo test --workspace --no-fail-fast -- --test-threads=4(AMD Radeon RX 9070 XT): 1244 passed, 3 failed (all pre-existing in--libonupstream/main426a5a7:fuzz_validate_and_gpu_1,fuzz_validate_and_gpu_3,gpu_image_get_resinfo_past_last_level), 46 ignored (--lib: 1171 passed, 3 failed, 26 ignored; 18 integration test binaries: 73 passed, 0 failed, 20 ignored; SKIPPED GPU cases: 6#1426f16/f32 per-lane cases in--lib+ 1heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsingpu_compute_e2e).$env:XCL_ADAPTER="Radeon(TM)"; cargo test -p xcl --test gpu_dxil_image_sampling_parity -- --nocapture --test-threads=1(AMD Radeon(TM) Graphics iGPU, prior to doc-comment refinement): 4 passed, 0 failed, 0 ignored.python -B -m unittest discover -s scripts -p 'test_*.py' -v: 25 passed.Regression run
Not needed: this PR adds only
crates/xcl/tests/gpu_dxil_image_sampling_parity.rsand does not modifycrates/xcl/srcoutside tests.Not tested
cargo test --release),XCL_SAMPLE_*game-data suites (unset), retailscripts/smoke.ps1, non-AMD GPUs.AI use
crates/xcl/tests/gpu_dxil_image_sampling_parity.rs, ran the GPU parity and workspace test suites, and drafted this PR description.@fromthemoonx on GitHub · 2026-11-25 12:16 UTC · original
Passes on NVIDIA (RTX 3060, wave32 and split wave64), and the new atomics test catches a swapped
fmin/fmaxthat no other test catches.27b3163(base426a5a7; merges intomain1a0bbe3without conflicts):cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4: 1247 passed, 0 failed, 46 ignored. The 4 new tests ingpu_dxil_image_sampling_parityran without aSKIPPEDline. On this cardwave_configs()giveswave32andsplit-wave64;native-wave64is not available here.cargo test -p xcl --test gpu_dxil_image_sampling_parity: 4 passed, 10 of 10 runs.fminandfmaxswapped in the direct translator's image atomics (lower_image.rs:1713),direct_dxil_image_atomics_and_descriptor_guard_parityfails (gpu_dxil_image_sampling_parity.rs:118).gpu_compute_e2e(4 passed) andcargo test -p xcl --lib gpu::(629 passed) do not notice.Hardware: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug.
Not tested: native wave64 (not on this card), a release build.
AI use: Claude Code (Claude Opus 5.5) ran the tests and the mutation check and wrote this report.
@oni-swr on GitHub · 2026-11-25 12:55 UTC · original
Test report: AMD Radeon RX 7800 XT (RDNA3, native wave64) for head
27b316333198efc03356b1c1c6bc3a9573a0f60c.Setup: RX 7800 XT, driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, rustc/cargo 1.100.0, debug build, DXC 1.9.0.5512 (
dxcon PATH). Detached checkout of the PR head, which does not includeea088a5. I did not merge it with currentmain. The diff is one new test file (crates/xcl/tests/gpu_dxil_image_sampling_parity.rs); I read it before running it.Targeted (
cargo test -p xcl --test gpu_dxil_image_sampling_parity -- --nocapture --test-threads=1): 4 passed, 0 failed, 0 ignored.direct_dxil_image_sample_dimensions_cube_offset_and_unorm_paritydirect_dxil_image_gather4_lod_and_sampler_rules_paritydirect_dxil_image_load_mip_store_resinfo_and_d16_paritydirect_dxil_image_atomics_and_descriptor_guard_parityFull suite (
cargo test --workspace --no-fail-fast -- --test-threads=4): 1245 passed, 2 failed, 46 ignored.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: the known RDNA3 failure onmain.gpu::recomp::tests::gpu_image_get_resinfo_past_last_level: this PR's base predatesea088a5, which fixes it. The PR only adds a test file and does not touch it.SKIPPEDlines: 6 inlower_dxil::tests(f16 / f32 conversion programs refused) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). These are not coverage.Not tested: retail title or
scripts/smoke.ps1, NVIDIA, Intel, Wine/vkd3d, this PR merged with currentmain.AI use: this report was run and written by Claude Code (Claude Sonnet 5.5). I read the diff but did not change any code.
@luckyteagirl on GitHub · 2026-11-25 12:57 UTC · original
Independent RX 6800M/RDNA2 run of the new MIMG parity integration suite at exact PR head
27b316333198efc03356b1c1c6bc3a9573a0f60c.Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver
30.0.13002.13003(native wave64 available); Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. Debugcargo test --locked -p xcl --test gpu_dxil_image_sampling_parity -j 2 -- --test-threads=1 --show-output, withXCL_ADAPTER=6800M,XCL_REQUIRE_GPU=wave64; isolated Cargo target.Exact-head suite: 2 passed, 2 failed, 0 ignored, no
SKIPPEDline.direct_dxil_image_atomics_and_descriptor_guard_parityanddirect_dxil_image_gather4_lod_and_sampler_rules_paritypassed.direct_dxil_image_load_mip_store_resinfo_and_d16_parityanddirect_dxil_image_sample_dimensions_cube_offset_and_unorm_parityfailed atCreateComputePipelineStatewith0x887A0005device suspension, before a parity result was compared.Isolation: The image-load test fails at the same PSO call when run by itself in a new process. With a one-line local test-only label before each backend call, it failed in the first
wave32direct-DXIL run. The sampling test passes 1/0/0 when run by itself, so its failure in the four-test run follows the suspended device. I also made a local test-only HLSL-onlywave32control of the image-load fixture; it independently failed atCreateComputePipelineStatewith the same0x887A0005. That does not establish a direct-vs-HLSL value mismatch or a production regression. I restored the clean PR worktree after those diagnostic edits.Limits: Focused integration tests only; no full workspace suite or retail-title smoke on this head. The passing tests exercise their available wave configurations; the image-load case stops at the first wave32 PSO, so its split/native-wave64 parity remains untested on this card. The GPU suspension may be specific to this older RX 6800M driver.
AI use: OpenAI Codex (GPT-6; exact variant not exposed in this session) ran the native Windows suite and isolated controls, checked the failure stage, restored the clean worktree, and drafted this report. No game data was used.
@jennydeth on GitHub · 2026-11-25 14:32 UTC · original
NVIDIA run of the new parity suite.
Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head
27b3163.Result: cargo test --workspace -- --test-threads=4: 1247 passed, 0 failed, 46 ignored. All four tests in gpu_dxil_image_sampling_parity.rs pass on the GPU: direct_dxil_image_sample_dimensions_cube_offset_and_unorm_parity, direct_dxil_image_gather4_lod_and_sampler_rules_parity, direct_dxil_image_load_mip_store_resinfo_and_d16_parity, direct_dxil_image_atomics_and_descriptor_guard_parity. SKIPPED: 18 GPU tests for no wave64 (expected on this card) and the usual per-lane / heap-window / driver-cache skips.
Not tested: native wave64.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@Lum7nt on GitHub · 2026-11-25 14:52 UTC · original
Tested on \
27b3163331\ (\27b3163, clean PR head):ustc 1.100.0\ (\x86_64-pc-windows-msvc), DXC \1.8.2502.11\ (Windows SDK \10.0.26100.0), debug profile, \XCL_ADAPTER=nvidia.
@DavidM1911 on GitHub · 2026-11-25 17:05 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!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.