shader: lower aligned gfx1030 packed D16 typed-buffer loads #1211
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1211
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1211/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?
@stan495 on GitHub · 2026-11-24 03:34 UTC · original
stan495:codex/gfx1030-tbuffer-load-format-d16-upstream→main· +68 −11 · 4 files · 3 commits · merged 2026-11-24 05:11 UTCScope
Add the gfx1030
tbuffer_load_format_d16_{x,xy,xyz,xyzw}forms for packed 16-bit UINT. An odd count requires an explicit low-half mask before consuming the last VGPR as a full word. Reads require aligned, in-range, read-only bindings and an observedvmcnt(0)wait.#1206 has merged. The only commit unique to this branch against
mainis the D16 load change. #1207 edits the adjacent store matcher, so the second D16 PR may need a branch refresh after the first merges.Validation
Tested
4e1775cb97bb8728b0782428ac0c4c2683baf81aon Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled. The adapters were RX 7900 XTX driver 32.0.32029.2010 and Microsoft WARP 10.0.26100.9818.cmake --preset dev -DINTAKE_PYTHON=<dev-python>andcmake --build --preset dev --target offscreen_checkpassed.ctest --preset dev --no-tests=error -R '^compute_store_aot_(mtbuf_load|guard_read)_' -Vreported 4 passes, zero failures and zero skips. Swapping packed halves changes word 1 from 8b06bba2 to bba28b06 for xy, xyz and xyzw. For x, it changes word 1 from 0000bba2 to bba20000.python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1passed on LLVM 15.0.7.python -B tests/form_coverage_check.py,python -B tests/docs_links_check.pyandpython -B tests/bidi_controls_check.pypassed.python -B tools/form_coverage.py out/results.xmlrecorded the new instruction forms from passing readbacks.The GPU measurements execute translated desktop DXIL against CPU references.
A local integration checkout,
8b8a60a4d025ffbf06d0a9550642a0c8fbcfcc3b, kept the D16 load bookkeeping and the D16 store matcher when resolving their adjacent edits.ctest --preset dev --no-tests=error -R '^compute_store_aot_(mtbuf_(load|store)|guard_read)_' -Vreported 6 passes, zero failures and zero skips on WARP and RX 7900 XTX. The passing readbacks recorded all 16 gfx1030 MTBUF forms.@tedin7 on GitHub · 2026-11-24 03:45 UTC · original · reviewed
Reviewed
4e1775cb(stacked on #1206de3b1b26) on Linux (Windows build and D3D12ctestexecution were not run locally).Diff audit (D16-specific changes on top of #1206)
tools/compute_store_aot.py: addstbuffer_load_format_d16_{x,xy,xyz,xyzw}lowering (cpu == "gfx1030",idxen, nooffen).x/xy/xyz/xyzwtoBUF_FMT_16_UINT,BUF_FMT_16_16_UINT,BUF_FMT_16_16_16_16_UINT(forxyzandxyzw), withcount = (components + 1) // 2DWORDs andoffset + 4 * count <= source_stride.d16_x,d16_xyz) assource_low16inloading, preventing whole-word consumption before or afters_waitcnt vmcnt(0); onlyv_and_b32_e32 vdst, 0xffff|65535, vsrcpromotes it to("alu", "(inputData.Load(...) & 0xffffu)").tests/compute_store_check.py: addsmtbuf_load_d16_{x,xy,xyz,xyzw}cases, negative controls (format, pre-wait use, unalignedoffset:2, missing0xffffmask,0x1ffffmask), and half-swap mutants.README.mdanddocs/experiments.md: consistent and title-neutral. Note: rebase ontomainafter #1206 merges.Linux checks (
/root/.local/share/x2w-rev-venv/bin/python -B)tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: passed (0 failures)tests/form_coverage_check.py: passedtests/docs_links_check.py: passed (15 Markdown files, 268 links)tests/bidi_controls_check.py: passed (977 files)offscreen_checkandctest -R '^compute_store_aot_(mtbuf_load|guard_read)_'not run locally.