Recompiler: translate ds_append / ds_consume (LDS form) #918
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!918
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/918/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?
@maximecmb on GitHub · 2026-11-24 08:16 UTC · original
recomp-ds-append-consume→main· +142 −0 · 2 files · 1 commits · closed without mergingds_appendandds_consumewere untranslated (the ISA census,isa_coverage, lists them as missing, and no open PR or issue covers them). Console compute programs use them as a wave-wide counter in LDS, e.g. to compact a list: the counter atM0[15:0] + offset16grows (append) or shrinks (consume) by the number of active lanes in one atomic, and every active lane gets the value from before the change.What is in it
crates/xcl/src/gpu/recomp/emit.rs: lane 0 of the console wave does oneInterlockedAddonxcl_ldswith the wave's EXEC count (nothing for an empty EXEC), and the old value goes to the active lanes through a lane read. In the split wave64 form (32-lane GPUs), the two halves meet before the atomic, so the upper half's earlier LDS stores are done, and the upper half reads the lower half's result (xcl_x_rla_uniform).GDS=1is reported as unsupported, as for the ADDTID forms.0 - n) goes through a lane read. With it straight in the atomic, NVIDIA's driver 617.42 refuses the pipeline (CreateComputePipelineState: E_OUTOFMEMORY), although the DXIL is a plainatomicrmw addofsub 0, n.crates/xcl/src/gpu/recomp/tests.rs: a translation test (offset and M0 address in three option sets, GDS rejected), and GPU tests for wave64 (split on 32-lane GPUs) and wave32: active lanes in both halves, inactive lanes untouched, an empty EXEC changes nothing, a full wave's count.Tested
stable-x86_64-pc-windows-msvc, debug, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 718 passed, 0 failed, 41 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware; noXCL_SAMPLE_*variables were set, so the game-data tests ran nothingcargo test -p xcl --lib ds_append_consume: 3 passedRegression run
main:This PR:
The PR's run came second and found the shader / pipeline caches the first one filled: its higher frame count is that, not this change.
Not tested
ds_append/ds_consumeAI use
🤖 Generated with Claude Code
@eizispark on GitHub · 2026-11-24 08:25 UTC · original
Hardware check of
8594f9d87fa553f278070e41b4153e2d6a5fcd60(verified clean merge withmain09940bb): pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace -- --test-threads=4:715 passed, 3 failed, 41 ignored(GPU tests skipped on this adapter:none; the 3 failures are the pre-existing concurrentplaced_title_textures_share_vram_and_preserve_pixelscontention and 2 downstreamPoisonErrors —cargo test -p xcl --lib hle::d3d12x -- --test-threads=1:114 passed, 0 failed, 1 ignored)gpu::recomp::tests::ds_append_consume_translate_and_reject_gds,gpu::recomp::tests::gpu_ds_append_consume_wave64(native 64-lane wave on RDNA4),gpu::recomp::tests::gpu_ds_append_consume_wave32(32-lane wave),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware, andgpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask— allokRegression run
main(beaa245):PR (
8594f9d):Not tested
ds_append/ds_consumein a wave32 program running in 64-lane hardware waves; gameplay past the menusAI use
scripts/smoke.ps1harness on this machine and formatted this report.@Evan-Lowry on GitHub · 2026-11-24 08:31 UTC · original
Independent RDNA2 hardware check — pass
Tested clean head
8594f9d87fa553f278070e41b4153e2d6a5fcd60on Radeon RX 6800 (driver32.0.21045.29003), Ryzen 5 5600, Windows 1126300.10075, Rust1.100.0(x86_64-pc-windows-gnullvm, debug), and DXC1.9.2609.5.cargo test --offline --locked -p xcl --lib ds_append_consume -- --nocapture: 3 passed, 0 failed, 0 ignored, no GPU skips withXCL_SPLIT_WAVE64unset, and the same counts withXCL_SPLIT_WAVE64=1. Both runs selectedXCL_ADAPTER=Radeon RX 6800and setXCL_REQUIRE_GPU=wave64.cargo test --offline --locked -p xcl --lib gpu_wave32_program_in_wave64_hardware -- --nocapture: 1 passed, 0 failed, 0 ignored, no GPU skips. This control required native wave64 hardware support.cargo test --offline --locked -p xcl --lib gpu::recomp::tests:: -- --test-threads=1: 120 passed, 0 failed, 17 ignored, no explicit GPU skips.Not tested Full workspace suite, MSVC build, or a retail-title smoke run. All
XCL_SAMPLE_*variables were unset.AI use Codex (GPT-6, exact variant unavailable) ran the tests and formatted this report.
@DarkPanda69 on GitHub · 2026-11-24 09:42 UTC · original · edited 2026-11-24 10:26 UTC
Test report for head
8594f9d87.Setup
main077ce40(all applied cleanly), debug build, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --lib -- gpu::recomp --test-threads=4, once withXCL_ADAPTER=radeonand once withXCL_ADAPTER=3060.Tested: pass on both GPUs, including the native wave64 form you listed as not tested.
gpu_ds_append_consume_wave32andgpu_ds_append_consume_wave64ok.Not tested: a title reaching these instructions.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Note: these runs check that the translated HLSL matches the test's reference model, in 64-lane and in 32-lane waves. They cannot show that the model matches the hardware (on #925 both had the same mistake, and the test still passed).
@SlopTart on GitHub · 2026-11-24 10:37 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
8594f9donto main6efdabc, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 723 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. ds_append/ds_consume LDS form green on wave64.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Pull request closed