shader: avoid negated TGSM atomic add in the HLSL LDS subtract lowering #3933
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!3933
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3931"
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?
@timbot103 on GitHub · 2026-12-03 12:43 UTC · original
timbot103:shader/compute-ir-lds-subtract→main· +77 −11 · 7 files · 1 commits · openRefs #1541, #2954 and #3921.
Change
Use one successful compare-exchange for each HLSL LDS subtract. The returning form writes the observed old word after the retry, including when the destination aliases the operand. The shader cache revision changes so existing native HLSL pragmas recompile with the new lowering.
expand_gfx1013_computeserves the register-based compute-request path and the shader compiler's#pragma x2w_ldspath. The portablegfx1013_compute_ir_checkcovers both form expansions. The GPU fixture compares the aliasing return, the resulting private LDS word, and 32 contending non-returning subtracts on a shared word.With the strengthened fixture and the old expansion, RTX 5080 PSO creation failed with
0x8007000eona44d1967. WARP passed. The old hardware cache still produced the failure with the fixed expander under the old key. With the new key, the same hardware cache directory produced a second entry and the readback passed.Verification
Windows 11 26200.9974, RTX 5080 driver 32.0.16.2140 (621.40), Microsoft Basic Render Driver with app-local WARP 1.0.22.0 and DXC 1.9.2602.17 (21d28f727). The LDS replay ran with its debug layer disabled.
Debug and Release each passed 100 tests with 0 failures and 0 skips. Both adapters passed readback. The two PR-preset controls, full Debug build, and repository checks passed.
🤖 Generated with Claude Code
@R0Y00 on GitHub · 2026-12-03 12:58 UTC · original · requested changes
The Linux check on
95c9e063reaches all 84 C++ cases successfully, including expand_atomic_subtract, then fails the Python meta-check because it still expects the literal 83/83 summary. Please update tests/gfx1013_compute_ir_meta_check.py to include the new case in CASES and update its count and summary expectations while retaining the mutation checks. The relevant job is https://github.com/R0Y00/Xbox2Windows/actions/runs/47108374219/job/144260156747.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.