shader: lower remaining gfx1030 finite-normal buffer float atomics #2748
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2756"
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 R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-26T06:02:43Z.
Summary
Refs #1545. Replay only the four gfx1030 MUBUF float atomic forms not already lowered by #2511:
buffer_atomic_fcmpswap,buffer_atomic_fcmpswap_x2,buffer_atomic_fmin_x2, andbuffer_atomic_fmax_x2. The existing FP32fminandfmaxlowering and test cases remain in place.Keep the fixed-address, non-returning raw
u0profile and reuse--buffer-float-domain finite-normal. The caller guarantees finite-normal memory; the four new forms additionally require finite-normal constant operands. Compare-swap reverses the native replacement/compare tuple for HLSL's compare-first CAS. The x2 reductions extend the image/buffer integer ordering helper to a single 64-bit CAS retry loop.glc, dynamic addressing, non-normal values and mixed UAV operations remain unsupported. The FP32 compare-swap usescs_6_0; the x2 cases usecs_6_6and the existing raw atomic64 capability gate, so each width is reported separately.Verification
Tested commit:
79abaa5d5588f59fd3a8120be71a5b3823ac621f, on upstream594bb3ce639be18bd8b28cf950f362506d275b66.git merge-tree --write-tree origin/main HEADcompleted without conflicts against that base and the later upstream5f27d8cf658cf11ea720fca8149e4f6cce6b7517.glc, a binary64 infinity in the compare operand, and an x2 address of byte offset 4. The first rejection wasFloat buffer compare-swap and _x2 require a finite-normal domain and no glc.offscreen_checkrebuilt successfully with MSVC 19.44 and DXC 1.9.2602.17. All three compile modes passed, including all five existing MIMG float cases (four min/max cases with and without distinct contenders, plus compare-swap).ctest -Nselected eight WARP/hardware entries; no GPU work ran during preparation.26300.9974, Debug preset, D3D12 debug layer unavailable. Serial CTest: 8 passed, 0 failed, 0 skipped in 60.68 s. The new FP32 compare-swap, new FP64 x2, existing FP32 buffer min/max, and existing image float atomics each passed on both WARP (Microsoft Basic Render Driver10.0.26100.9818) and hardware (Intel Arc B39032.0.101.8509). All unmutated readbacks had zero mismatches. The same-run CTest JUnit andform_coverage.pyconfirmed all four new gfx1030 MUBUF forms in passing records on both adapters. The eight-test subset covers nine distinct gfx1030 forms (six MUBUF and three MIMG), not a project-wide coverage estimate.First difference for each new mutation on both adapters (all at zero-based DWORD index 2):
buffer_atomic_fcmpswap3f865432bf812345buffer_atomic_fcmpswap_x21234567876543210buffer_atomic_fmin_x28765432112345678buffer_atomic_fmax_x28765432176543210The shared MIMG helper regression also reproduced the missing-retry negative for its contended min/max fixtures (first difference at mip 0 DWORD 32). For min, both adapters reported
bf800012expected and7f7fffffactual.Before opening this PR,
git merge-tree --write-treecompleted cleanly against upstream6f696d48a020fa47440c50ce68914509a0bc2f19and with the planned comparison-gradient and gather batches in order. This is separate from the execution results.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T06:12:58Z.
Review: APPROVED
Reviewed finite-normal operand/domain checks, compare/replacement order and ordered-key 64-bit CAS. Re-ran the two new draw suites serially on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, Windows 11 build 26200. All four cases had exact results and the predicted per-form mutation mismatch at word 2 on both adapters, with zero debug warnings/errors and no skips.