shader: lower remaining gfx1030 finite-normal buffer float atomics #2756
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2756
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2756/head"
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?
@stan495 on GitHub · 2026-11-26 06:02 UTC · original
stan495:codex/gfx1030-mubuf-float-extra→main· +253 −24 · 5 files · 1 commits · merged 2026-11-26 06:13 UTCSummary
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.@R0Y00 on GitHub · 2026-11-26 06:12 UTC · original · approved these changes
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.
github-bot referenced this pull request2026-11-28 22:11:19 +00:00
github-bot referenced this pull request2026-11-28 22:12:40 +00:00