shader: return old LDS words from min, max and reverse subtract #908
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/915"
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-23T17:01:02Z.
Scope
Add the returning forms of the five private LDS word updates from #898.
ds_rsub_rtn_u32,ds_min_rtn_i32,ds_max_rtn_i32,ds_min_rtn_u32andds_max_rtn_u32write the pre-update word to the destination VGPR. The same zero-offset private address, initialization, EXEC and wait checks apply.Verification
Tested
a329153on Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used the AMD Radeon RX 7900 XTX (driver 32.0.32029.2010). WARP used Microsoft Basic Render Driver (10.0.26100.9818).7 passed, 0 failed, 0 skipped. For each opcode, both backends compared two returned words and the final LDS word across the whole 320-word UAV for one and three groups. Each program aliases the destination with the data VGPR once and the address VGPR once. All 15 mutants produced the expected first mismatch on both backends. For reverse subtract, changing the order produced
7ffffff8at word 1 instead of80000008. Returning the new word and dropping the second write also produced mismatches.Passed with LLVM 15.0.7 in WSL Ubuntu 24.04. The decoded forms match the source fixture, the direct and CLI paths generate the same HLSL, and the coverage records include all five forms.