shader: lower private LDS qword counters and conditional exchange #948
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!948
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/948/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 18:17 UTC · original
stan495:codex/gfx1030-ds-inc-u64→main· +76 −4 · 3 files · 4 commits · merged 2026-11-24 02:04 UTCScope
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.
@lambirou on GitHub · 2026-11-24 01:36 UTC · original
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.
@stan495 on GitHub · 2026-11-24 01:49 UTC · original
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.