Tests: check all 16 32-bit MIMG image_atomic_* ops on the GPU #1702
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1712"
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 thiagocalile on 2026-11-24T19:35:36Z.
Adds GPU execution tests for all 16 32-bit MIMG
IMAGE_ATOMIC_*operations across wave64 and wave32, covering integer ALU ops, signed/unsigned min/max,GLC=0vsGLC=1return-value behaviour, CAS-loopinc/dec/cmpswap/fcmpswap, floatfmin/fmax, multi-lane contention on a single texel, andEXECmasking. No runtime or recompiler source files are changed.What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_image_atomics_32bit_int_and_glc: testsIMAGE_ATOMIC_ADD,SUB(including 32-bit wrap-around),AND,OR,XOR,SWAP(GLC=1returning the prior texel value andGLC=0updating memory while keepingVDATAunchanged),UMIN,UMAX,SMIN,SMAX(signed negative extremes onDXGI_FORMAT_R32_SINT), multi-lane contention on 1×1 UAVs, andEXEC-masked writes on both wave64 and wave32.gpu_image_atomics_32bit_cas_and_float: testsIMAGE_ATOMIC_INC,DEC(including limit wrap-around),CMPSWAP,FCMPSWAP(bitwise-0.0vs+0.0discrimination),FMIN,FMAX(per-lane and multi-lane contention across negative and positive floats),GLC=1return values, andEXECmasking on both wave64 and wave32.Tested
32.0.21045.29003;XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test -p xcl --lib gpu_image_atomics_32bit_ -- --nocapture: 2 passed, 0 failed, 0 ignored (0.30s; both wave64 and wave32 executed on hardware).XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 857 passed, 3 failed, 42 ignored (xcl --lib: 808 passed, 3 failed, 22 ignored; integration tests: 49 passed, 0 failed, 20 ignored).main(c160d86) on this RX 6600 (placed_title_textures_share_vram_and_preserve_pixels: 3D mip subresource mismatch, plus 2 mutex-poison cascadestransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory; tracked by #1028).SKIPPED(not counted as coverage):heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows(plus D3D12 debug-layer tests skip becaused3d12SDKLayers.dllis not installed).Not tested
DMASK 0x3/0xFimage atomics, retail title smoke run (test-only PR; no runtime code changed).AI use
crates/xcl/src/gpu/recomp/tests.rs, ran the targeted and full workspace test suites on my RX 6600, and drafted this PR description; I reviewed the diff and test output before opening the PR.Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T20:10:05Z.
NVIDIA run, since the PR lists it as not tested: RTX 3070 (Ampere, 32-lane waves only, so the wave64 case goes through the split form), driver 616.56, Windows 11, DXC 1.8.2502.11,
bfdefbe.gpu_image_atomics_32bit_int_and_glcandgpu_image_atomics_32bit_cas_and_floatpass in 3 of 3 runs underXCL_REQUIRE_GPU=wave64, so neither case is skipped.Test-only PR, synthetic tests, no game files. AI-assisted (Claude Code).
Imported from ivall/xcl. Originally posted by mantavisual on 2026-11-24T20:28:25Z.
Test report for
bfdefbea1fcb89edf0e4e7cb5d679c19ca2687c3. It adds the whole suite on NVIDIA to the run above, and a check of what the tests notice.Tested
cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 860 passed, 0 failed, 42 ignored. Both new tests ran.b9b6ea6: 891 passed, 0 failed, 42 ignored.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Do the tests notice a broken translator?
IMAGE_ATOMIC_SWAP. These two lines pass normally and fail with that break:assert_eq!(v[22], lu + 1)in the first test,assert_eq!([v[18], v[19]], [st.vgpr[l][18], st.vgpr[l][19]])in the second.Not tested: AMD, native wave64, retail title.
AI use: Claude Code (Claude Opus 5.5) ran this on my machine, wrote the report and posted it for me.
Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T20:37:28Z.
Independent Windows release GPU test run on NVIDIA Ampere (
RTX 3060 Ti, wave32) atbfdefbea1fcb89edf0e4e7cb5d679c19ca2687c3: both new 32-bit MIMGimage_atomic_*GPU tests pass.Setup
8024 MiB VRAM, Ampere, wave32), driver32.0.16.210131.8 GBRAM26200rustc 1.100.0, DXC1.9.2602.17,--releaseResults (
cargo test --workspace --release --no-fail-fast -- --test-threads=4)0: 860 passed, 0 failed, 42 ignored across 20 result blocks (SKIPPED: 2no wave64, 2no D3D12 debug layer,heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).gpu::recomp::tests::gpu_image_atomics_32bit_int_and_glc— okgpu::recomp::tests::gpu_image_atomics_32bit_cas_and_float— okNot tested: Debug build, AMD / native wave64 hardware.
AI use: Antigravity (
Gemini 4 Neon) built and ran the workspace test suite on this hardware and drafted this report from the captured output; reviewed before posting. No game files attached.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:18:59Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T07:12:34Z.
Tested
Independent Intel Arc A770 run of the two checked-in synthetic fixtures at
bfdefbea1fcb89edf0e4e7cb5d679c19ca2687c3, from a clean detached checkout. Arc A770 driver32.0.101.9175, Ryzen 7 3800X, Windows 11 Enterprise Evaluation 25H2 build26200.9974, Rust/Cargo1.100.0MSVC, DXC1.9.2609.5(01b62ad47). Unoptimized test profile.The two invocations used the pinned Cargo-emitted test executable and
XCL_ADAPTER=A770under the lab's Arc mutex. 2 passed, 0 failed, 0 ignored, 0 explicit skips. D3D12 reported 8–32 lanes per wave, so the stock fixtures ran native wave32 through HLSL/DXC. Each checked returned old values and final UAV texels across all 32 lanes. The contention cases checked final shared texels. Swap was the explicitGLC=0VDATA preservation check.Not tested
Native or split wave64, direct DXIL, release, other adapters, the full workspace suite, retail smoke, and negative controls.
AI use
T3 Code / Codex (gpt-6.2-sol) ran the fixtures, checked their assertion scope, and drafted this report.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:18:56Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:33:55Z.
Triage (#1607) – head
bfdefbeNo open or merged PR adds these GPU tests of the 32-bit
image_atomic_*ops. #1778 and #2276 test MIMG parity between direct DXIL and HLSL, which is a different check.One case now contradicts main.
gpu_image_atomics_32bit_cas_and_floatexpectsimage_atomic_fcmpswapwith +0.0 in memory and -0.0 as the compare value not to swap (FCMP_CASES[1]). Since #2011, float compare-and-swap uses IEEE equality: -0.0 == +0.0 swaps, and main'sgpu_float_cas_uses_ieee_equalityasserts exactly that forimage_atomic_fcmpswap. After a rebase, this case fails on a GPU and needs to expect the swap.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.