shader: lower gfx1030 fixed-address atomic counters #1451
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1458"
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-24T11:52:38Z.
Summary
Lower non-returning gfx1030
buffer_atomic_inc,buffer_atomic_dec, and the_x2forms with compare-exchange retry for the existing fixed-address raw UAV profile. The fixtures cover above-limit values, 32-bit wrap, and 64-bit borrow across DWORDs. An omitted retry first differs at DWORD index 2 forinc, expected00000000, actualc5c5c5c5.Refs #1354. The fixed-address atomic-exchange groundwork from #1384 is on
main.Local check
The LLVM 15 assembly, disassembly and compute-container CLI regression passed at
22458aea02b54b5b6ac040a63881aa7ae8dda1d6.Independent GPU validation requested
Please run the translated DXIL tests from a Windows dev build and post the tested SHA, adapter, driver, Windows build, debug-layer status, pass/fail/skip counts and the first mismatch if present. The tests compare all 320 DWORDs at one and two groups. The WARP and physical adapter results for this head are pending.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T12:31:18Z.
Review: COMMENTED
Dual-platform review of PR #1458 at commit
22458aea02b54b5b6ac040a63881aa7ae8dda1d6:Code & Scope Audit
tools/compute_store_aot.pyaddsincanddectoMUBUF_ATOMIC_METHODS(CompareExchange/CompareExchange64) and lowers non-returning fixed-addressbuffer_atomic_inc/decand_x2using a[allow_uav_condition] do { ... } while (observed != expected);CAS retry loop seeded withobserved = 0u(0ull).expected >= limit ? 0 : expected + 1forinc;expected == 0 || expected > limit ? limit : expected - 1fordec) handle above-limit initial values,0, andUINT32_MAX/UINT64_MAXlimits without overflow or underflow.off),glc-clear, and descriptor/offset alignment checks apply.tests/compute_store_check.pytests 32-bit and 64-bit cases across 1 and 2 wave32 groups, including a negative control (while (observed != expected)->while (false)) that verifies failure atword=2.Verification
llvm-mc-19,llvm-objcopy-19,libLLVM-19.so):python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: passed.git diff --check origin/main...HEAD: passed.python3 -B tests/docs_links_check.py: passed (16 Markdown files, 326 links).python3 -B tests/bidi_controls_check.py: passed (1190 files).--preset dev):cmake --build --preset dev --target offscreen_check -- -j 6(10.99s);ctest --preset dev -R '^compute_store_aot_mubuf_counter' --parallel 4 --no-tests=error --output-on-failure: 4/4 passed (3.61s)./O2(--preset release):cmake --build --preset release --target offscreen_check -- -j 6(7.95s);ctest --preset release -R '^compute_store_aot_mubuf_counter' --parallel 4 --no-tests=error --output-on-failure: 4/4 passed (3.67s).Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-24T12:31:36Z.
Independent GPU validation
Measured
22458aeamerged onto06e2ff78(my merge81cb7632, tree8b4901a2, working tree clean). Nothing below is a code change.Environment
10.0.26100.0user-mode)AMD Radeon RX 9070 XT vendor=1002 device=7550, driver32.0.32029.2010Microsoft Basic Render Driver vendor=1414 device=008c, driver10.0.26100.9818dev(Debug),debug_layer=unavailable— see the limitation belowCommands
Observed
Four entries, three runs each: 12 passed, 0 failed, 0 skipped.
On the physical adapter, both
incanddec, scalar and_x2, print:The
while (false)mutant control inside the fixture is asserted and was caught on both backends, so the pass is not a silent no-op.Regression
^compute_store_aot_mubuf, the whole buffer-atomic and format family: 26 passed, 0 failed, 0 skipped.Limits
0x887a002d, SDK component missing; the Graphics Tools optional feature is absent and its install is refused from a remote session with0x80070005), so the run says nothing about D3D12 API validation — only that the readbacks match.AI-assisted; runs executed locally on the adapter above.