compute: lower SMEM descriptor stores #3587

Manually merged
github merged 1 commit from github-bot/gh-3585 into gh-pr/3585/base 2026-11-30 11:11:27 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-11-30 11:00 UTC · original
lambirou:compute/smem-stores → main · +249 −2 · 4 files · 1 commits · merged 2026-11-30 11:06 UTC

Part of the SMEM slice (Refs #319).

This adds the six descriptor-backed SMEM store forms that the compute AOT path can model: s_store_dword, s_store_dwordx2, s_store_dwordx4 (the 64-bit base pair is the first two words of the bound u0 descriptor) and s_buffer_store_dword, s_buffer_store_dwordx2, s_buffer_store_dwordx4 (the full four-word u0 V#). The data are 1, 2 or 4 consecutive, width-aligned SGPRs; the store writes the bound raw output UAV u0 at the immediate byte offset (null is zero). The three s_scratch_store_dword* forms stay refused because the compute path has no scratch memory model.

Refusals: unaligned or incomplete SGPR pairs/quads, registers above s105, a descriptor that is not the bound u0 UAV (constant/source descriptors and unloaded or table slots), data registers without a known word, overlapping stores, a lane-guarded store, SGPR offsets, offset:, glc, dlc and negative offsets. SCC-preserving prefixes now include the two store mnemonics.

Tests

  • compute_store_aot_smem_stores 1/1, compute_store_aot_smem_wide_loads 1/1.
  • compute_store_aot_smem_stores_warp and _hardware pass (320 words, 0 mismatch) on WARP and the AMD Radeon RX 9060 XT (driver 32.0.32029.2010).
  • compute_store_aot_warp and compute_store_aot_hardware still pass (320 words per case, 0 mismatch).
  • form_coverage_check.py and docs_links_check.py pass.

Coverage

+6 forms on gfx1013; the six stores are absent from the gfx1030 reference, so that table is unchanged by this PR. With the two open f16 PRs (#3588 DPP rest and #3586 SDWA unary) the combined expectation is 1,586/1,968 gfx1013 and 1,571/1,863 gfx1030.

Limits

The model requires the bound u0 descriptor: an arbitrary global pointer, a b0/t0 descriptor or a table pair is refused. A root UAV carries no length, so the caller must bind a u0 buffer that covers every accessed offset, as for the existing raw stores. The LLVM 15 binary round-trip was not replayed locally. The runs are desktop WARP/RX 9060 XT, not Xbox; the debug layer is unavailable on this host.

AI-assisted.

**@⁠lambirou** on GitHub · 2026-11-30 11:00 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3585) `lambirou:compute/smem-stores` → `main` · +249 −2 · 4 files · 1 commits · merged 2026-11-30 11:06 UTC Part of the SMEM slice (Refs #319). This adds the six descriptor-backed SMEM store forms that the compute AOT path can model: `s_store_dword`, `s_store_dwordx2`, `s_store_dwordx4` (the 64-bit base pair is the first two words of the bound u0 descriptor) and `s_buffer_store_dword`, `s_buffer_store_dwordx2`, `s_buffer_store_dwordx4` (the full four-word u0 V#). The data are 1, 2 or 4 consecutive, width-aligned SGPRs; the store writes the bound raw output UAV `u0` at the immediate byte offset (`null` is zero). The three `s_scratch_store_dword*` forms stay refused because the compute path has no scratch memory model. Refusals: unaligned or incomplete SGPR pairs/quads, registers above s105, a descriptor that is not the bound u0 UAV (constant/source descriptors and unloaded or table slots), data registers without a known word, overlapping stores, a lane-guarded store, SGPR offsets, `offset:`, `glc`, `dlc` and negative offsets. SCC-preserving prefixes now include the two store mnemonics. ## Tests - `compute_store_aot_smem_stores` 1/1, `compute_store_aot_smem_wide_loads` 1/1. - `compute_store_aot_smem_stores_warp` and `_hardware` pass (320 words, 0 mismatch) on WARP and the AMD Radeon RX 9060 XT (driver 32.0.32029.2010). - `compute_store_aot_warp` and `compute_store_aot_hardware` still pass (320 words per case, 0 mismatch). - `form_coverage_check.py` and `docs_links_check.py` pass. ## Coverage **+6 forms on gfx1013**; the six stores are absent from the gfx1030 reference, so that table is unchanged by this PR. With the two open f16 PRs (#3588 DPP rest and #3586 SDWA unary) the combined expectation is **1,586/1,968** gfx1013 and **1,571/1,863** gfx1030. ## Limits The model requires the bound u0 descriptor: an arbitrary global pointer, a b0/t0 descriptor or a table pair is refused. A root UAV carries no length, so the caller must bind a u0 buffer that covers every accessed offset, as for the existing raw stores. The LLVM 15 binary round-trip was not replayed locally. The runs are desktop WARP/RX 9060 XT, not Xbox; the debug layer is unavailable on this host. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 11:05:23 +00:00
github-bot changed target branch from main to gh-pr/3585/base 2026-11-30 11:11:25 +00:00
github manually merged commit b1b46bc77b into gh-pr/3585/base 2026-11-30 11:11:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.