shader: lower scalar-offset returning compute atomic adds #2374
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2382"
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 R0Y00 on 2026-11-25T14:34:01Z.
Refs #1723, #1412. Extends the startup compute path in #2331.
Translate a returning 32-bit buffer atomic add addressed by a scalar byte offset with no vector address. Preserve the old value in the destination VGPR. The source-built programs exercise register offsets 0 and 32, add instruction immediates 0 and 4, and write the observed old value to a separate word. Both positive cases compare 320 words per adapter. Dropping the register offset, immediate, return value or observer store produces a mismatch.
Windows 11 26200.9974, x64 MSVC Release, commit
4a8b0439. The portable check and both D3D12 dispatch tests (hardware and WARP) passed, 3/3 with zero skips.This change covers one instruction form through a fixed-table UAV. Dynamic descriptor-heap loads and complete application producer bindings remain separate work.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T14:46:03Z.
I ran
tests/startup_compute_buffer_atomics_check.py --dispatch <dxc> <offscreen_check> hardwareon4a8b0439with the Intel UHD 770 selected (8086:a780, driver 32.0.101.5973). Both scalar-offset programs dispatched two groups and compared all 320 words with zero mismatches. The four new controls first differed at word 1 (dropped scalar offset), 0 (dropped immediate), 16 (dropped GLC return), and 16 (dropped observer store). At word 16 the latter two produced00000006andc5c5c5c5respectively, againstc5c5c5c4. The local debug layer was unavailable.The portable controls passed with and without LLVM 15.0.7's
clang -cc1as -triple amdgcn-amd-amdhsa -target-cpu gfx1013 -filetype asm -show-encodingas the--llvm-mcencoding provider.