shader: check the paired LDS read address snapshot on the host #2356

Manually merged
github merged 1 commit from gh-pr/2356/head into gh-pr/2356/base 2026-11-27 00:18:33 +00:00
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 13:33 UTC · original
RavenCurseBurg:tests/lds-read2-host-snapshot → main · +3 −0 · 1 files · 1 commits · merged 2026-11-25 13:37 UTC

The last review of #2347 found that deleting the address snapshot from the paired LDS read survived its no-argument Python test. Case G uses v6 as both the address and the first result. The host check now requires the snapshot and both indexed reads in that order, so deleting the snapshot fails before a GPU is needed.

I ran python -B tests/startup_gfx2hlsl_compute_check.py on the merged tree and checked that deleting the snapshot locally fails the added assertion. The existing dispatch and overlap readbacks are unchanged. Equal offsets are already documented in the LDS exchange section.

Agent environment: Codex + GPT-6.2 Astra xhigh, Windows x64.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 13:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2356) `RavenCurseBurg:tests/lds-read2-host-snapshot` → `main` · +3 −0 · 1 files · 1 commits · merged 2026-11-25 13:37 UTC The last review of #2347 found that deleting the address snapshot from the paired LDS read survived its no-argument Python test. Case G uses v6 as both the address and the first result. The host check now requires the snapshot and both indexed reads in that order, so deleting the snapshot fails before a GPU is needed. I ran `python -B tests/startup_gfx2hlsl_compute_check.py` on the merged tree and checked that deleting the snapshot locally fails the added assertion. The existing dispatch and overlap readbacks are unchanged. Equal offsets are already documented in the [LDS exchange section](https://github.com/R0Y00/Xbox2Windows/blob/ec519d0ca7a11e6a8d8e7197a85f67fa5ea6e108/docs/experiments.md#startup-compute-lds-dword-exchange). Agent environment: Codex + GPT-6.2 Astra xhigh, Windows x64.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:18:31 +00:00
github manually merged commit 55505e0bef into gh-pr/2356/base 2026-11-27 00:18:33 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 13:37 UTC · original · reviewed

Review of head 55505e0bef (test-only, 3 lines in tests/startup_gfx2hlsl_compute_check.py).

Findings: 0 P1, 0 P2.

  • The new assert pins the ds_read2_b32 lowering: the address is saved in a before the first result overwrites v6, and both loads use a (offsets 20 and 144 for the offset0:5 offset1:36 fixture). This matches the ISA rule that both reads use the address VGPR as it was before the instruction. It is a real guard for the overlap case, and it extends the existing check_lds suite.
  • Clean-room: no external material.

Commands executed locally:

  • python3 tests/startup_gfx2hlsl_compute_check.py -> exit 0
  • python3 tests/docs_links_check.py -> pass (457 links)
  • python3 tests/bidi_controls_check.py -> pass
  • git diff --check origin/main...HEAD -> clean
  • Mutation: in tools/startup/gfx2hlsl.py (~line 1877) removed the a = <address> snapshot for ds_read2_b32; the test exits 1 with an AssertionError. Reverted with git checkout -- .; the test passes again.
  • GitHub CI: Linux Python checks, gfx1013 fixtures and Build and test on Windows all SUCCESS.

Windows: the PR touches only a .py file, so the pure-Python fast path applies.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 13:37 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2356#pullrequestreview-6058608656) · **reviewed** Review of head 55505e0bef768d8bb8021627c7302cbf17feeece (test-only, 3 lines in tests/startup_gfx2hlsl_compute_check.py). Findings: 0 P1, 0 P2. - The new assert pins the ds_read2_b32 lowering: the address is saved in `a` before the first result overwrites v6, and both loads use `a` (offsets 20 and 144 for the `offset0:5 offset1:36` fixture). This matches the ISA rule that both reads use the address VGPR as it was before the instruction. It is a real guard for the overlap case, and it extends the existing check_lds suite. - Clean-room: no external material. Commands executed locally: - `python3 tests/startup_gfx2hlsl_compute_check.py` -> exit 0 - `python3 tests/docs_links_check.py` -> pass (457 links) - `python3 tests/bidi_controls_check.py` -> pass - `git diff --check origin/main...HEAD` -> clean - Mutation: in tools/startup/gfx2hlsl.py (~line 1877) removed the `a = <address>` snapshot for ds_read2_b32; the test exits 1 with an AssertionError. Reverted with `git checkout -- .`; the test passes again. - GitHub CI: Linux Python checks, gfx1013 fixtures and Build and test on Windows all SUCCESS. Windows: the PR touches only a .py file, so the pure-Python fast path applies. AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.