tombox-xshader: decode and translate ds_read_b96, ds_read_b128, ds_wr… #240
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!240
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/240/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?
@azerioxfr on GitHub · 2026-11-23 06:44 UTC · original
azerioxfr:xshader-ds-b96-b128→main· +25 −2 · 3 files · 1 commits · closed without mergingLibrary / area: tombox-xshader, wide LDS accesses (
hlsl/ds_ext.rssplit_wide_lds)Exports changed (exports.txt rows): none
Source of the behaviour: opcodes from
tests/isa_table/gfx1013.txt(DS 0xde, 0xdf, 0xfe, 0xff). Semantics from the RDNA2 ISA: consecutive dwords ataddr + offset, likeds_read_b64/ds_write_b64.One topic, +25 / -2: 1 line in
rdna2/mnem.rs, 9 inhlsl/ds_ext.rs, 15 lines of test.What was missing
tests/isa_table.rslists these four under "ds: gfx1013 opcodes not named by the decoder", so a compute or geometry shader that moves 3 or 4 dwords through LDS in one instruction failed translation.The change
ds_write_b96(0xde) /ds_write_b128(0xdf)ds_write_b32of data0..data0+2 / +3 at offset, +4, +8 (+12)ds_read_b96(0xfe) /ds_read_b128(0xff)ds_read_b32into vdst..vdst+2 / +3 at the same offsets; a part whose vdst is the address register is read last (the existing rule)Unaligned b96 / b128 addresses depend on the LDS alignment mode, so they are not claimed. The tests use 16-byte aligned addresses.
Tests
ds_lds_b64_computegains, for both widths, a write then a read through the neighbouring lane at offsets 0, 0x10 and 0x400, with vdst 10 and with vdst 15 (the read's own address register):--release, DXC 1.9.2609)exec_mem::ds::ds_lds_b64_compute+8for the 4th dword--test isa_table/--test opcodesRun on
x86_64-pc-windows-gnu(no MSVC linker here). These are data moves only, with no floating point.cargo test -p tombox-xshader --test exec -- --exact exec_mem::ds::ds_lds_b64_computepassesmissingwith a note@omonkeyz on GitHub · 2026-11-23 14:08 UTC · original
Applied locally on main with your authorship kept (cherry-picked,
00052ef); the tombox-xshader suite passes in a sandbox (exec 155/155 on WARP). It ships in the next release; this PR will be closed when that is pushed. Thanks.@omonkeyz on GitHub · 2026-11-25 13:08 UTC · original
Applied on main in
00052ef(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed