tombox-xshader: translate s_buffer_store_dword* into UAV writes #258
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!258
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/258/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 08:01 UTC · original
azerioxfr:xshader-smem-stores→main· +118 −0 · 3 files · 1 commits · closed without mergingLibrary / area: tombox-xshader, SMEM stores (
hlsl.rsscalar descriptor resolution and SMEM emission)Exports changed (exports.txt rows): none
Source of the behaviour: opcodes from
tests/isa_table/gfx1013.txt(SMEM 0x10..0x12, 0x18..0x1a).s_buffer_store_*addresses the descriptor exactly likes_buffer_load_*(SBASE + SOFFSET / imm).One topic, +118: 2 lines in
rdna2/mnem.rs, about 62 inhlsl.rs, 54 lines of test.What was missing
tests/isa_table.rslistss_buffer_store_dword{,x2,x4}ands_store_dword{,x2,x4}under "smem: gfx1013 opcodes not named by the decoder".The change
s_buffer_store_dword/_x2/_x4desc_candidates/kind_atused by the scalar loads. A writable buffer is written as one dword per SDATA register at(SOFFSET & ~3) + imm, into the same (structured) UAV the MUBUF store path uses. A base that is not a descriptor, could name more than one descriptor, or names a non-writable one is refused explicitly.s_store_dword/_x2/_x4Tests
--release, DXC 1.9.2609)scalar_buffer_stores(3 widths, imm 0 / 4 / 8 / 0x40, SOFFSET 12 + imm 4, untouched neighbour checked)scalar_smem_store_refusals(threes_store_dwordrefusals; non-descriptor and non-writables_buffer_store)scalar_smem_loads--test isa_table/opcodes/syntheticRun on
x86_64-pc-windows-gnu(no MSVC linker here). Integer only.missingwith a note@omonkeyz on GitHub · 2026-11-23 14:08 UTC · original
Applied locally on main with your authorship kept (cherry-picked,
ecc06dd); 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
ecc06dd(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.@SchmashinPrunes on GitHub · 2026-11-24 14:34 UTC · original · reviewed
A note in case someone plans a silicon check of this PR:
s_buffer_store_dword*can't be verified on RDNA2.x parts. LLVM 18 assembles the scalar stores for gfx1013 but rejects them for gfx1036 ("instruction not supported on this GPU"). An unsupported opcode I tried on the same gfx1036 today hung the GPU, so I didn't run them. A check needs a gfx101x GPU (RX 5000 series).(Measured with an AI assistant, Claude.)
Pull request closed