shader: return old values from private LDS word updates #885
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!885
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/885/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-23 15:49 UTC · original
stan495:codex/gfx1030-ds-add-rtn-u32→main· +90 −10 · 4 files · 1 commits · merged 2026-11-23 16:11 UTCScope
Lower
ds_add_rtn_u32,ds_sub_rtn_u32,ds_and_rtn_b32,ds_or_rtn_b32andds_xor_rtn_b32using the private-word update model introduced in #878. Each instruction captures the original operands, returns the old LDS word in the destination VGPR, and updates the private word. The existing checks require zero offset, initialization, a verified private address, full EXEC, and an immediates_waitcnt lgkmcnt(0).Verification
Tested
daf87eeon Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used an AMD Radeon RX 7900 XTX (driver 32.0.32029.2010). WARP used the Microsoft Basic Render Driver (10.0.26100.9818).7 passed, 0 failed, 0 skipped. The five synthetic kernels each issue two returning updates. The first destination aliases the data VGPR and the second aliases the address VGPR. Both backends matched the CPU reference across the full UAV for one and three groups. Passing LDS dispatches reported zero debug errors and warnings. All five mutants returning the updated value differed at word 0. All five mutants preserving the return value but dropping the second update differed at word 2. For addition, the first mutant produced
40000011instead offffffff0, and the second produced40000011instead ofc0000014.Passed with LLVM 15.0.7 on WSL Ubuntu 24.04. The gfx1030 Wave32 binaries decoded to the expected DS forms and produced the same HLSL as source assembly through both the direct and CLI paths. The coverage records include all five new forms.