Tests: add direct DXIL vs HLSL GPU parity suite for MIMG image ops #2266
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by Vadson159 on 2026-11-25T12:02:56Z.
Add 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.Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T12:16:08Z.
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.
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T12:55:32Z.
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.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T12:57:24Z.
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.
upstream-sync referenced this pull request2026-11-25 14:08:42 +00:00
Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T14:32:29Z.
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.
Imported from ivall/xcl. Originally posted by Lum7nt on 2026-11-25T14:52:35Z.
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.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T17:05:10Z.
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!
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T05:01:29Z.
Independent desktop NVIDIA verification of PR #2276 at head
27b316333198efc03356b1c1c6bc3a9573a0f60c(1commit; exact parent & merge-base:426a5a745db4d5e4b037449ede0b70cb342f5192, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12, Wave32-only Ada), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted GPU parity tests & build (
27b31633)cargo test --release -p xcl --test gpu_dxil_image_sampling_parity -- --nocapture(3 consecutive runs)4 passed; 0 failed; 0 ignored; 0 filtered out× 3 (1.04s,0.35s,0.34s,0skipped; live RTX 4060wave32+split-wave64execution ofdirect_dxil_image_atomics_and_descriptor_guard_parity,direct_dxil_image_gather4_lod_and_sampler_rules_parity,direct_dxil_image_load_mip_store_resinfo_and_d16_parity, anddirect_dxil_image_sample_dimensions_cube_offset_and_unorm_parity)cargo build --release -p xcl0.08sincremental after--testbuild, exit0,0new warnings)Paired quiet 60 s retail smoke (
title: 29640639)Exact parent & merge-base (
426a5a745db4d5e4b037449ede0b70cb342f5192, cached baseline on the same machine):PR #2276 (
27b316333198efc03356b1c1c6bc3a9573a0f60c):Runtime log observations (
xcl.log)9203log lines,0[ERROR]/ device-removal / panic lines (dxil_cache:460hits,0misses,0compilation failures;228background pipelines,0failures).19597 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14437 MB committed by the process; video memory 6116 MB local, 4650 MB non-local.Limits of coverage
crates/xcl/tests/gpu_dxil_image_sampling_parity.rs,+452/-0,0production-code changes); all 4 direct-DXIL vs. HLSL MIMG image parity tests executed and passed3/3on desktop NVIDIA RTX 4060 acrosswave32andsplit-wave64(wave_configs()omitsnative-wave64on Wave32-only Ada hardware).AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-27T05:35:34Z.
RX 9070 / Wine / RADV verification: all four MIMG tests pass on exact head
27b316333198efc03356b1c1c6bc3a9573a0f60cand on mainc2ee10e4e905eb736e56953c52b749e18bcc7edewith the same new test file added. Native wave64, split wave64 and native wave32 all executed.Tested
26.3.1-arch3.5, Ryzen 7 7700, CachyOS7.3.0-5-cachyos. Windows GNU release, Rust1.97.1, GE-Proton11-12 / Wine 11.0 Staging, vkd3d-proton8293130ebe370b1+(local asserts-disabled build), DXC/DXIL1.9.2602.17.426a5a745db4d5e4b037449ede0b70cb342f5192only by the new test file. No runtime source was changed for either build.cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --test gpu_dxil_image_sampling_parity --no-run --message-format=json-render-diagnostics.<test.exe> direct_dxil_image_ --nocapture --test-threads=1, then--test-threads=4.Additional isolation: each original test ran with
--exact --nocapture --test-threads=1, selecting one available mode using a test-onlyXCL_WORKFLOW_IMAGE_WAVE=wave32/split-wave64/native-wave64filter. Three fresh processes per test/mode/source: 1 passed, 0 failed in all 72 runs. This keeps an earlier mode's assertion from hiding another mode. Six separate probe processes verify both physical wave widths.Across 82 processes: 300 MIMG GPU dispatches, 100 per mode, plus 12 physical-width probe dispatches. Coverage includes the suite's dimensional/array/cube sampling, offsets, gradients, comparison sampling, gathers, half packing, typed loads/stores, resource dimensions, EXEC-masked UAV writes, deterministic atomic final states and invalid-descriptor zeroes. Non-cube
UNORM=1remains direct-only: the HLSL refusal is checked as the original test expects.Raw captures were independently checked against Python pixel/index arithmetic and IEEE-half packing: 267,308 targeted register/UAV/width words, including complete UAV readbacks. All six RDNA2 programs were independently re-encoded from the public ISA tables; texture inputs and samplers were also recomputed. All parity fields and final UAV states agree across sources, applicable backends and repetitions. The extra 1DArray resinfo channel is checked for parity only. Atomic race-order return registers are excluded from repeat comparisons, as in the original test. Shader containers repeat byte-for-byte per source/mode/backend.
0 ignored, 0 skipped, no device removal or native fault. Inherited
XCL_*cleared; network off, RX 9070 selected,XCL_REQUIRE_GPU=wave64, private enabled caches.Not tested
Full workspace suite, native Windows, other GPUs, retail workload,
scripts/smoke.ps1, timing or FPS. These results do not establish the cause of the earlier RX 6800M device-suspension report.AI use
OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the test-only diff, added raw captures and mode isolation, ran the tests, independently checked encodings, texture data, deterministic results, wave widths and source/executable provenance, and drafted this report. Publication authorized by the account owner.
Imported from ivall/xcl. Originally posted by throny on 2026-11-27T22:11:50Z.
merge-check claim
head:
27b3163331Imported from ivall/xcl. Originally posted by throny on 2026-11-27T22:28:17Z.
merge-check
base:
2c717a04head:
27b3163331merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1470 passed, 0 failed, 47 ignored; its four tests ran and passed here (26 SKIPPED lines); base alone: 1466 passed, 0 failed, 47 ignored
review: test-only, one new file. It skips cleanly without a GPU, DXC or wave64 (it would run nothing and print no SKIPPED line if no wave configuration exists). One assertion expects unorm image ops to be unsupported and will need updating when the HLSL path supports them. Open from the thread and unexplained: on an RX 6800M (RDNA2, older driver) the load / resinfo test ended in a device removal at pipeline creation, on the HLSL path too; it passes on RDNA3, RDNA4 and NVIDIA.
performance: none at run time; the four tests take about a second (reasoned from the thread; not timed here).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T03:54:14Z.
merge-check claim
head:
27b3163331Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T10:19:11Z.
merge-check
base:
e429936c10head:
27b3163331merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2129 passed, 10 failed, 48 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole, gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops, gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange, gpu::recomp::heap_window_tests::gpu_heap_flat_reads_match_guarded_and_root_output, gpu::recomp::tests::gpu_compute_mode_dispatch_abi, gpu::recomp::tests::gpu_float_cas_uses_ieee_equality, test_title_draws_with_a_root_signature_under_the_debug_layer, test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred: these 9 fail on the base too (the base e429936c's suite, run alone on this PC with the same command: 2126 passed, 9 failed, 48 ignored, 25 SKIPPED, these same 9 failing), and each also failed when rerun alone on this merge (the two debug-layer e2e tests stop on the D3D12 debug layer rejecting a pixel shader as corrupt or unsigned, and test_title_runs_and_game_folder_is_untouched on the test title's console command list memory-methods check, "post-Wait32/64 write failed"); not caused by this PR; also failing: hle::d3d12x::alloc_pool::tests::completion_queries_run_outside_allocator_state, under the concurrent load only: rerun alone on the same merge commit it passed (1 passed, 0 failed); the diff does not touch this test or the code it tests. The suite ran on this PC at the same time as 4 other PRs' suites, in one queued job.
review: none. Whole diff read (one new integration test file, crates/xcl/tests/gpu_dxil_image_sampling_parity.rs, 452 lines: direct DXIL vs HLSL parity for image sampling, gather4, load / store / resinfo, float and CAS image atomics and T# guards, on every wave form the adapter has). Test-only; the atomics compare only order-independent final values.
performance: no runtime change (test-only diff).
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge 62c472c391dcb7cf4f5eef428b61a4b4de7698d1 (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
correction (2026-11-28): the base counts above were first given as 2128 passed: that base run reused this PC's merge test binary (one cargo target dir for both sides). The base was rerun with its own target dir; the same 9 tests fail on it, so the classification and the verdict stand.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:43:46Z.
Triage (#1607) – head
27b3163Test-only. #1778 (
gpu_dxil_parity.rs) also checks direct DXIL against HLSL for some MIMG ops (integer image atomics,image_load/image_store,image_gather4_lz). This PR covers sampling across dimensions, gather4 variants and S# rules, resinfo, D16/A16, and float/CAS atomics, so the two overlap only a little. The APIs it uses (translate_full,run_with_statics,TestSampler,console_heap::GLOBAL_MAX) exist on main. One brittle point: the UNORM block asserts that the HLSL path still reportsMIMG unormas unsupported, so it will fail once HLSL supports it.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.