xshader: add ds_write_b16_d16_hi and buffer_store_format_xy/xyz #161
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!161
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/161/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?
@GDAgent on GitHub · 2026-11-22 16:49 UTC · original
GDAgent:port/xshader-ds-b16-hi-and-store-format-xy-xyz→main· +43 −6 · 5 files · 1 commits · closed without mergingLibrary / area: tombox-xshader (
rdna2/mnem.rs,hlsl.rs,tests/exec_mem/ds.rs,tests/exec.rs)Exports changed (exports.txt rows): none
Source of the behaviour: AMD RDNA2 ISA specification (DS instruction table, MUBUF opcode table). Ported from drycheetah84/TomBox
1d5dbc1and brcly/TomBox commits (MIT OR Apache-2.0); credit line added toTHIRD_PARTY/CREDITS. The ISA table in open #152 also listsds_write_b16_d16_hi; this change adds the decoder entry for it.Changes:
ds_write_b16_d16_hi(DS0xa1): storesDATA[31:16]through the existing atomic sub-word LDS write path (theds_write_b16read-modify-write loop), with the source shifted right by 16.buffer_store_format_xy(MUBUF0x05) andbuffer_store_format_xyz(MUBUF0x06); they lower through the existing typed-buffer store emitter.Tests:
ds_lds_compute:ds_write_b16_d16_hiat both halfword offsets of a dword, checked against the neighbouring halfword.buffer_mubuf:buffer_store_format_xyandbuffer_store_format_xyz, checking the written dwords and that the untouched neighbours keep their values.cargo test --release -p tombox-xshader --test exec -- ds_lds_compute buffer_mubuf(D3D12 execution on hardware): 2 passed.cargo test --release -p tombox-xshader --lib --test opcodes --test synthetic: 116 passed, 0 failed, 2 ignored.main:scalar_smem_loads,exec_mem::mtbuf::mtbuf_d16_store_formats,vop::basic::vop2_basic. Nothing extra fails with this change.@omonkeyz on GitHub · 2026-11-22 17:10 UTC · original
Applied in
f9fd22f(merged in43d17b0) with your authorship kept, thanks.Pull request closed