Shaders: xcl disasm prints DS, buffer and flat operands as LLVM #1013
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!1013
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1013"
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?
@upipibi on GitHub · 2026-11-24 10:23 UTC · original
upipibi:disasm-flat-operands→main· +172 −1 · 1 files · 3 commits · openxcl disasmprints three families of memory instructions differently from what they encode. Each commit compares the printed line with LLVM's for every line of the in-repo LLVM corpus of that family (tests/data/llvm-amdgpu). They're one PR because all three change the samematcharm offormat; they're separate commits, so each can be reviewed or dropped on its own. One more set of the text gaps of #664. No open PR found for any of them (gh pr list --search "disasm"), and this merges cleanly with #687, #706, #716, #790 / #791, #811 and #812.What is in it (all in
crates/xcl/src/gpu/rdna2.rs, text only)b0ec796DS: single-address LDS / GDS instructions print one 16-bitoffset:(they were split intooffset0:52 offset1:18foroffset:4660);ds_read2*/ds_write2*/ds_wrxchg2*keepoffset0:/offset1:. Testllvm_gfx10_ds_text: 1705 lines ofgfx10_ds.txt.cdc4546MUBUF / MTBUF: the address isoff, one register or a pair according to IDXEN / OFFEN (it was always two, so a constant-offset load showed a VGPR it doesn't read);format:[BUF_FMT_…]fortbuffer_*; flags in LLVM's order includingldsandtfe; TFE's extra data register. Testsllvm_gfx10_buffer_text(822 lines ofgfx10_mubuf.txt/gfx10_mtbuf.txt) andbuffer_address_format_and_flags(5 words checked againstllvm-mc21.1.8,-mcpu=gfx1030).6d247e5FLAT / GLOBAL / SCRATCH: only the operands the form has: no result register for an atomic that returns none,offfor a missing base (it printednull/exec_hi), one address register beside an SGPR base, a signed 12-bit offset, thenglc slc dlc lds. Testllvm_gfx10_flat_text: 368 lines ofgfx10_flat.txt/gfx1030_new.txt.Tested
cargo test -p xcl --lib gpu::rdna2::tests::: 13 passed, 0 failed. Before each commit its new tests fail: DS "1043 of 1705 lines differ from LLVM's", buffer "820 of 822", flat "333 of 368".cargo test --workspace --no-fail-fast -- --test-threads=4on6d247e5(all three): 708 passed, 0 failed, 41 ignored (xcl lib: 667 passed, 0 failed, 21 ignored). An earlier run had the #718 cubemap flake (705 passed, 3 failed:placed_title_textures_share_vram_and_preserve_pixelsand the two tests its poisoned lock takes with it), whichmainshows on this machine too.no wave64:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Regression run
From Kalmarv's run (https://github.com/ivall/xcl/pull/1013#issuecomment-7138701492), thanks:
main:
PR:
Not tested
XCL_SAMPLE_*data: the game-data tests passed without running.ds_swizzle_b32lines with a pattern: the pattern stays a number (offset:57344) where LLVM writesoffset:swizzle(FFT,0).ldsandtfewere each checked alone againstllvm-mc; their order among other flags is LLVM's by analogy.llvm-mc.AI use
xcl disasmwith the LLVM test lines in the repository, wrote the code, the tests and this description, and ran the tests.🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 14:24 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
6d247e5(on its basee50836b).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 708 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.llvm_gfx10_flat_text,buffer_address_format_and_flags,llvm_gfx10_buffer_text,llvm_gfx10_ds_text.Not tested
AI use
@Kalmarv on GitHub · 2026-11-24 17:06 UTC · original
Regression pair for
6d247e5againstmaine50836b(this PR's base), for the Regression run section. Both runs pass: no device removal, no crash, 100 % ofmain's frames, 98 % of its peak commit.Tested
scripts/smoke.ps1, the same retail title for 60 s each:mainate50836b(this PR's base, 67 commits behind today'smain) first, then this PR's head, one after the other on the same machine.maine50836b:this PR,
6d247e5:An earlier pair on the same two commits had this PR's run crash at 30.8 s:
0xc0000005inVCRUNTIME140.dll+0x1c45a(the memcpy ofcopy_from_slice) ←tiling::Chain::detile_level(tiling.rs:438) ←title_textures::subresources(title_textures.rs:1170) on asubresources_onworker, reading title memory outside the coherent window. This PR doesn't touch that code; it is the in-place read race that open #751 addresses. The blocks above are the second pair, run after it.Not tested
xcl disasmitself: the run doesn't print a disassembly, so it shows only that the rest of the runtime is unchanged.AI use: Claude Code (Claude Opus 5.5)
@DavidM1911 on GitHub · 2026-11-25 09:17 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.