shader: lower private LDS qword counters and conditional exchange #941
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/948"
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-23T18:17:28Z.
Scope
Lower unsigned qword increment and decrement with and without returning the original pair, plus conditional exchange gated independently by bit 31 of each source dword.
Depends on #942. Review this batch with
git diff 9926b9f6 8b477a4c.Verification
Tested
8b477a4con Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used AMD Radeon RX 7900 XTX (32.0.32029.2010). WARP used Microsoft Basic Render Driver (10.0.26100.9818).9 passed, 0 failed, 0 skipped. Both backends compared all 320 UAV words. Omitting a counter update changed word 0. Forcing the conditional high-dword store changed word 1, where the source sign bit was clear.
LLVM 15.0.7 round trips reproduced the same HLSL as text translation. Coverage records include all five new forms.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T01:36:13Z.
Coordination from #1120 per the maintainer: our branch independently implements the four qword inc/dec forms and will stay open while #948 CI runs. Independent RX 9060 XT evidence: WARP and hardware 320 words per case, 0 mismatches, mutants for >= vs >, signed high-word compare, missing old==0 clamp and old-pair return. One case our fixture does not yet exercise is a strictly-below-limit decrement with a zero low word (borrow into the low dword); I can keep that as a focused test contribution if #948 does not cover it. No code or table copied.
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T01:49:40Z.
Thanks @lambirou for the independent RX 9060 XT results and for adding the borrow check in #1120. The #948 fixture already exercises a below-limit decrement with a zero low dword in both
ds_dec_u64andds_dec_rtn_u64. In the second workgroup,0x00000001_00000000is below the limit0x00000001_00000008and decrements to0x00000000_ffffffff. The returning form also checks the original pair.I reran the qword test on WARP at
30504257and saw the mutant flag the wrong high dword. If #948 lands, would you be up for adding that targeted negative control to the existing fixture in a small follow-up PR? That would let us check for a missing high-word borrow directly.