Recompiler: report every DS instruction with GDS=1 as unsupported #1238
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1238
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1238/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?
@emirduran707 on GitHub · 2026-11-24 13:34 UTC · original
emirduran707:recomp-ds-gds-unsupported→main· +23 −3 · 2 files · 1 commits · merged 2026-11-25 01:13 UTCOnly the two ADDTID forms checked a DS instruction's GDS bit. Every other DS instruction with GDS=1 was translated as an access to the group's LDS (
xcl_lds), and nothing was recorded as unsupported. This covers plain reads and writes, the 8/16-bit and d16 forms,ds_wrxchg2and the atomics. Sods_add_rtn_u32 … gdsadded into the title's groupshared data and returned old LDS values instead of the global data share's. The global data share is a separate memory, and the recompiler already decided that a GDS access is reported as unsupported: #79 for ADDTID, with the test comment "GDS=1 must be reported as unsupported and not allocate LDS".The GDS check now sits before the ADDTID branch, so it covers every DS instruction that reaches LDS.
ds_swizzle_b32andds_bpermute_b32use no memory and return earlier; they are unchanged.What is in it
crates/xcl/src/gpu/recomp/emit.rs: the check moved out of the ADDTID branch.crates/xcl/src/gpu/recomp/tests.rs:ds_gds_plain_forms_are_unsupported, which needs no GPU. It translatesDS_ADD_U32,DS_WRITE_B32andDS_READ_B32with GDS=1, and checks that each is reported unsupported and that noxcl_ldsis declared.Tested
cargo test --workspace -- --test-threads=4one642921: 742 passed, 0 failed, 41 ignored; no SKIPPED GPU testsDS_ADD_U32not inunsupported(left: None,right: Some(1)); with it it passesRegression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
@thehollowedone on GitHub · 2026-11-24 13:52 UTC · original
Independent RTX 3080 Ti check on
e642921, Windows 11 build 26300, driver 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11, debug.I added a synthetic kernel that writes one LDS word per lane, inserts a
DS_WRITE_B32withGDS=1, then reads the LDS words back. With the parent emitter restored, the mixed kernel ran and the GDS write silently overwrote all 64 LDS words. The PR reports one unsupportedds_write_b32and the GPU runner declines the mixed kernel. The LDS-only control still ran and returned all 64 expected words. The stock GDS regression and the added test passed at the PR head with no skips.Synthetic shaders only. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch fixture and drafted this report.
@DavidM1911 on GitHub · 2026-11-24 14:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Thanks!
@DavidM1911 on GitHub · 2026-11-26 04:17 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin