shader: lower gfx1030 whole-texel D16 UINT buffer stores #1339
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1346"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T08:49:18Z.
Summary
buffer_store_format_d16_x,_xy, and_xyzwwith the corresponding identity-selectedBUF_FMT_16_UINT,BUF_FMT_16_16_UINTandBUF_FMT_16_16_16_16_UINToutput descriptors. Use the existing checked address and store-overlap rules.x. An overlapping store in either half is refused. The accepted subset writes whole texels. Thexyzform needs a native check of the fourth channel when used with a four-channel descriptor.Validation
Commit tested
6ebbcc586e91cc0e15155b46f3fc51bd7b3951fe.46 passed, 0 failed, 0 capability skips. Both
compute_store_aot_mubuf_store_format_*fixtures recorded all three new forms. The same run reports 32 of 73 gfx1030 MUBUF forms. The coverage and documentation checks passed.Windows build
26300.9974, WARP on Microsoft Basic Render Driver (10.0.26100.9818) and hardware on Intel Arc B390 (32.0.101.8509). The debug layer was unavailable on both. The dispatches ran translated desktop DXIL.The cleared-preservation mutation failed on both adapters at word 1 with expected
c5c5cdef, actual0000cdef. The first-pair swap forxyandxyzwfailed at word 1 with expected89abcdef, actualcdef89ab. Rejection fixtures cover offset alignment, bounds, width and descriptor wait mismatches, a write to the companion half, andxyzwith the four-channel descriptor.Passed on Ubuntu 22.04.5 with LLVM 15.0.7.
git diff --checkand the merge-tree checks against main and the independent D16 load PR #1343 passed.The tested merge base on upstream main was
d6cbd5d7c9ac3f1c4583fc459ccbd990689af903.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T09:07:37Z.
Review: COMMENTED
Technical peer-review at commit
6ebbcc586e91cc0e15155b46f3fc51bd7b3951fe:Verification
git diff --check origin/main...HEAD: clean.tests/docs_links_check.py: passed (16 Markdown files, 300 links).tests/bidi_controls_check.py: passed (1113 tracked files).tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: passed.tests/rdna2_tools_check.py: passed (138 tests, 18 skipped).tests/form_coverage_check.py: passed.--preset dev):cmake --build --preset dev --target offscreen_checksucceeded (3.85s);ctest --preset dev -R '^compute_store_aot_mubuf_store_format_warp$'1/1 passed (3.47s)./O2(--preset release): build succeeded (1.04s);ctest --preset release -R '^compute_store_aot_mubuf_store_format_warp$'1/1 passed (3.35s).Code & Test Notes
tools/compute_store_aot.py: extends--output-formatand formatted MUBUF store lowering to acceptbuffer_store_format_d16_x,_xy, and_xyzwwith matchingBUF_FMT_16_UINT,BUF_FMT_16_16_UINT, andBUF_FMT_16_16_16_16_UINTdescriptors,idxenwithoutoffen, and DWORD-aligned offsets.d16_xreserves the containing DWORD (partial = True) and preserves its high 16 bits via RMW while rejecting overlapping stores.d16_xyzis explicitly rejected.tests/compute_store_check.py: exercises all three packed widths at 1 and 2 groups (16 threads/group) against a CPU byte reference, plus negative controls foroffen, unaligned/out-of-bounds offsets, overlappingbuffer_store_short, mismatched--output-format, missinglgkmcnt(0),d16_xyz, and mutant shaders clearing the preserved halfword or swapping packed channels.