compute: accept a scratch-base register write that nothing can observe #1655

Manually merged
github merged 3 commits from gh-pr/1655/head into gh-pr/1655/base 2026-11-26 23:23:43 +00:00
Owner

@⁠triggered02 on GitHub · 2026-11-24 16:22 UTC · original
triggered02:compute/flat-scr-write → main · +63 −0 · 4 files · 3 commits · merged 2026-11-24 16:49 UTC

Fixes #1648, per the scope you set: the exact whole-register immediate write is handled when the accepted program cannot observe scratch state, direct reads and scratch-dependent memory stay refused, the untouched UAV guards are compared as well as the output, and the offline acceptance count is reported separately (as not measured — see the end).

Change

s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO|HI), <imm> now lowers to nothing. Nothing the compute lowering accepts can read either half — a read through s_getreg_b32 and every scratch_*/flat_* memory form are themselves unmodelled and refused — so the write has no observable consumer. Its value is not tracked, which is why only this exact whole-register immediate form is accepted; every other s_setreg_imm32_b32 form stays refused.

Tests

  • draw-scratch-base-write: lowers the indexed kernel with the write in front, requires the generated HLSL to be byte-identical to the untouched kernel, then runs the same WARP readback as the original case — so all 320 words and the untouched guard words are compared, and a wrong stored or guard word still fails.
  • Refusal pins in controls(): a read of either half, a scratch memory form, a write to any other hardware register, and a write-only kernel with a mismatched binding.
release: compute_store_aot_warp Passed 5.76 s   compute_store_aot_scratch_base_warp Passed 2.68 s
dev:     compute_store_aot_warp Passed 6.99 s   compute_store_aot_scratch_base_warp Passed 2.98 s
readback: groups=3 compared_words=320 mismatches=0

Fail-first: with the write's acceptance removed, the fixture raises

ValueError: Unsupported compute instruction: s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO), 0

and the new test exits 1.

What this does not establish

  • LLVM is not installed on this machine, so the issue's CLI .dxbc reproduction was not run, and the acceptance-count rescan (389 of 2,689 records) is not measured here — reporting it separately as you asked, and reporting it as unmeasured rather than estimating from the unit fixture.
  • Scratch state remains unmodelled: the write's value is not tracked. If a later accepted instruction can observe the base, this decision has to be revisited rather than extended.
  • No other profile, CPU or GPU is exercised.

One design note: my first version also pre-scanned the program for consumers of the base. That guard was unreachable — every consumer form is refused before it can observe anything — and no test could make it fire, so I removed it rather than ship a branch that looks protective but never runs. The comment and the docs say why the write is safe instead.

AI-assisted (Claude Code).

**@⁠triggered02** on GitHub · 2026-11-24 16:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655) `triggered02:compute/flat-scr-write` → `main` · +63 −0 · 4 files · 3 commits · merged 2026-11-24 16:49 UTC Fixes #1648, per the scope you set: the exact whole-register immediate write is handled when the accepted program cannot observe scratch state, direct reads and scratch-dependent memory stay refused, the untouched UAV guards are compared as well as the output, and the offline acceptance count is reported separately (as *not measured* — see the end). ## Change `s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO|HI), <imm>` now lowers to nothing. Nothing the compute lowering accepts can read either half — a read through `s_getreg_b32` and every `scratch_*`/`flat_*` memory form are themselves unmodelled and refused — so the write has no observable consumer. Its value is not tracked, which is why only this exact whole-register immediate form is accepted; every other `s_setreg_imm32_b32` form stays refused. ## Tests - **`draw-scratch-base-write`**: lowers the indexed kernel with the write in front, requires the generated HLSL to be **byte-identical** to the untouched kernel, then runs the same WARP readback as the original case — so all 320 words and the untouched guard words are compared, and a wrong stored or guard word still fails. - **Refusal pins in `controls()`**: a read of either half, a scratch memory form, a write to any other hardware register, and a write-only kernel with a mismatched binding. ``` release: compute_store_aot_warp Passed 5.76 s compute_store_aot_scratch_base_warp Passed 2.68 s dev: compute_store_aot_warp Passed 6.99 s compute_store_aot_scratch_base_warp Passed 2.98 s readback: groups=3 compared_words=320 mismatches=0 ``` Fail-first: with the write's acceptance removed, the fixture raises ``` ValueError: Unsupported compute instruction: s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO), 0 ``` and the new test exits 1. ## What this does not establish - **LLVM is not installed on this machine**, so the issue's CLI `.dxbc` reproduction was not run, and the **acceptance-count rescan (389 of 2,689 records) is not measured here** — reporting it separately as you asked, and reporting it as unmeasured rather than estimating from the unit fixture. - Scratch state remains unmodelled: the write's value is not tracked. If a later accepted instruction can observe the base, this decision has to be revisited rather than extended. - No other profile, CPU or GPU is exercised. One design note: my first version also pre-scanned the program for consumers of the base. That guard was unreachable — every consumer form is refused before it can observe anything — and no test could make it fire, so I removed it rather than ship a branch that looks protective but never runs. The comment and the docs say why the write is safe instead. AI-assisted (Claude Code).
Refs #1648. The gfx1013 store profile refused s_setreg_imm32_b32 on HW_REG_FLAT_SCR_LO/HI, so a kernel that
writes the scratch base and never reads it produced no HLSL at all: on the reported record set that diagnostic
was the first refusal for 389 records.

The whole-register immediate write now lowers to nothing. Nothing the lowering accepts can read either half: a
read through s_getreg_b32 and every scratch_* or flat_* memory form are themselves unmodelled and refused, so
the write has no observable consumer. Its value is not tracked, which is why only this exact form is accepted;
every other s_setreg_imm32_b32 form stays refused.

Tests, in tests/compute_store_check.py:

- draw-scratch-base-write lowers the indexed kernel with the write in front, requires the generated HLSL to be
  byte-identical to the untouched kernel, then runs the same WARP readback as the original case, so the 320
  words and the untouched guard words are compared and a wrong stored or guard word still fails.
- controls() pins the refusals: a read of either half, a scratch memory form, a write to any other hardware
  register, and a write-only kernel with a bad binding.

Measured here:

  release: compute_store_aot_warp Passed 5.76 s, compute_store_aot_scratch_base_warp Passed 2.68 s
  dev:     compute_store_aot_warp Passed 6.99 s, compute_store_aot_scratch_base_warp Passed 2.98 s
  readback: groups=3 compared_words=320 mismatches=0

Fail-first: with the write's acceptance removed, the fixture raises
"ValueError: Unsupported compute instruction: s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO), 0" and the new
test exits 1.

What this does not establish. LLVM is not installed on this machine, so the issue's CLI .dxbc reproduction was
not run and the acceptance-count rescan (389 of 2,689 records) is NOT measured here; the unit fixture above is
the only evidence. Scratch state remains unmodelled: the write's value is not tracked, so any future accepted
instruction that can observe the base must revisit this decision. No other profile or CPU is exercised.
Review on #1655: LLVM prints an imm32 whose bit pattern looks like a float as an inline float (0x3f800000 as
1.0, 0x3e23f983 as 0.15915494), and that spelling is what the disassembler hands to lower(), so the
integer-only literal check refused a valid write.

The hwreg is still matched strictly (only HW_REG_FLAT_SCR_LO and HW_REG_FLAT_SCR_HI, whole register), and the
literal must be one of LLVM's spellings: decimal, hex, an inline float with optional sign and exponent, or the
non-finite names. Anything else is refused with "Unsupported scratch-base immediate spelling", and a raw
register id (hwreg(4)) or a register operand stay refused as unsupported instructions.

The fixture now lowers and reads back three spellings - 0, 1.0 and 0.15915494 - and the mode asserts each one
produces HLSL byte-identical to the untouched kernel before the WARP readback.

  release: compute_store_aot_warp Passed 6.83 s, compute_store_aot_scratch_base_warp Passed 3.45 s
  dev:     compute_store_aot_warp Passed 7.03 s, compute_store_aot_scratch_base_warp Passed 3.43 s
  readback: groups=3 compared_words=320 mismatches=0

Fail-first: restoring the integer-only literal check fails the mode with
"ValueError: Unsupported scratch-base immediate spelling: 1.0".
Review on #1655: controls() only asserted the negative cases, so the raw and Linux binary modes never lowered an
accepted write, and HW_REG_FLAT_SCR_HI only appeared in a rejection. A stray quote also ended the first line of
draw_scratch_base_write's docstring.

controls() now lowers the integer write and both float-spelled spellings and requires each to equal the
untouched kernel, which covers both scratch halves positively and runs in every mode (verified by importing the
module and calling controls(), as the binary mode does before dispatching, rather than by needing LLVM here).
The docstring quote is gone.

  dev:     compute_store_aot_warp Passed 7.39 s, compute_store_aot_scratch_base_warp Passed 4.02 s
  release: compute_store_aot_warp Passed 7.44 s, compute_store_aot_scratch_base_warp Passed 3.95 s
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:23:39 +00:00
github manually merged commit e6d94835b8 into gh-pr/1655/base 2026-11-26 23:23:43 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 16:22 UTC · original · edited 2026-11-24 16:25 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T16:25:27.301197Z c259252 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 16:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#issuecomment-7137559632) · edited 2026-11-24 16:25 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"c259252e11320c9a5500f061420e74e03373f471","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T16:25:27.301197Z">2026-11-24T16:25:27.301197Z</relative-time> | `c259252` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 16:25 UTC · original

P2 Badge Accept float-spelled scratch-base immediates

When a valid scratch-base immediate has a bit pattern LLVM spells as an inline float, such as 0x3f800000 becoming 1.0 in tests/rdna2_tools_check.py::test_hwreg_operands_use_llvm_spelling, pixel_aot.disassemble() passes that spelling to lower(), but this integer-only regex misses it and lowering falls through to Unsupported compute instruction. Since the immediate is intentionally ignored, accept these float spellings too (or parse them back to their 32-bit values).

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 16:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#discussion_r4683124627) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Accept float-spelled scratch-base immediates** When a valid scratch-base immediate has a bit pattern LLVM spells as an inline float, such as `0x3f800000` becoming `1.0` in `tests/rdna2_tools_check.py::test_hwreg_operands_use_llvm_spelling`, `pixel_aot.disassemble()` passes that spelling to `lower()`, but this integer-only regex misses it and lowering falls through to `Unsupported compute instruction`. Since the immediate is intentionally ignored, accept these float spellings too (or parse them back to their 32-bit values). Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠triggered02 on GitHub · 2026-11-24 16:32 UTC · original

Correct, and the integer-only literal check was wrong for exactly that reason: LLVM spells an imm32 whose bit pattern looks like a float as an inline float, and that is the string the disassembler hands to lower(). 0x3f800000 arrives as 1.0, 0x3e23f983 as 0.15915494. Fixed in 30ef44f3.

The hwreg match stays strict (only HW_REG_FLAT_SCR_LO / _HI, whole register); only the literal became LLVM's spelling of an imm32 — decimal, hex, inline float with optional sign and exponent, or the non-finite names. Anything else is refused with Unsupported scratch-base immediate spelling, and hwreg(4) (a raw register id) or a register operand stay refused as unsupported instructions, both pinned in controls().

The fixture now lowers and reads back three spellings — 0, 1.0, 0.15915494 — and the mode asserts each produces HLSL byte-identical to the untouched kernel before the WARP readback:

release: compute_store_aot_warp Passed 6.83 s, compute_store_aot_scratch_base_warp Passed 3.45 s
dev:     compute_store_aot_warp Passed 7.03 s, compute_store_aot_scratch_base_warp Passed 3.43 s
readback: groups=3 compared_words=320 mismatches=0

Fail-first for the float path specifically: restoring the integer-only check fails the mode with ValueError: Unsupported scratch-base immediate spelling: 1.0.

Thanks — this one would have stayed latent until a real title record used a float-looking immediate, since every fixture I wrote used 0 and 0x400.

**@⁠triggered02** on GitHub · 2026-11-24 16:32 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#issuecomment-7137832579) Correct, and the integer-only literal check was wrong for exactly that reason: LLVM spells an imm32 whose bit pattern looks like a float as an inline float, and that is the string the disassembler hands to `lower()`. `0x3f800000` arrives as `1.0`, `0x3e23f983` as `0.15915494`. Fixed in `30ef44f3`. The hwreg match stays strict (only `HW_REG_FLAT_SCR_LO` / `_HI`, whole register); only the literal became LLVM's spelling of an imm32 — decimal, hex, inline float with optional sign and exponent, or the non-finite names. Anything else is refused with `Unsupported scratch-base immediate spelling`, and `hwreg(4)` (a raw register id) or a register operand stay refused as unsupported instructions, both pinned in `controls()`. The fixture now lowers and reads back three spellings — `0`, `1.0`, `0.15915494` — and the mode asserts each produces HLSL byte-identical to the untouched kernel before the WARP readback: ``` release: compute_store_aot_warp Passed 6.83 s, compute_store_aot_scratch_base_warp Passed 3.45 s dev: compute_store_aot_warp Passed 7.03 s, compute_store_aot_scratch_base_warp Passed 3.43 s readback: groups=3 compared_words=320 mismatches=0 ``` Fail-first for the float path specifically: restoring the integer-only check fails the mode with `ValueError: Unsupported scratch-base immediate spelling: 1.0`. Thanks — this one would have stayed latent until a real title record used a float-looking immediate, since every fixture I wrote used `0` and `0x400`.
Author
Owner

@⁠triggered02 on GitHub · 2026-11-24 16:34 UTC · original

Thanks — no P1/P2 and both nits were fair. Fixed in e6d94835; the review was on c259252e, so it predates the float-spelling fix Codex raised separately.

Positive coverage in every mode. controls() now lowers the integer write and both float-spelled spellings and requires each to equal the untouched kernel:

untouched = aot.lower(INDEXED, 32, **INDEX_BINDING)
for lines in [SCRATCH_BASE_WRITE_LINES] + [[spelling] + INDEXED for spelling in SCRATCH_BASE_WRITE_SPELLINGS]:
    assert aot.lower(lines, 32, **INDEX_BINDING) == untouched, lines[0]

That also covers HW_REG_FLAT_SCR_HI positively (the 0.15915494 spelling writes HI), so it is no longer only a rejection case. controls() runs before mode dispatch, which is what the binary mode exercises first; I verified it by importing the module and calling controls() directly — controls ok, 2 extra spellings positively covered — since I do not have LLVM here to run the full binary mode.

Docstring. The stray " is gone.

dev:     compute_store_aot_warp Passed 7.39 s, compute_store_aot_scratch_base_warp Passed 4.02 s
release: compute_store_aot_warp Passed 7.44 s, compute_store_aot_scratch_base_warp Passed 3.95 s

Your mutation check is the right one for the hwreg split; mine only removed the acceptance entirely, so narrowing LO/HI was not covered locally. Thanks for both.

**@⁠triggered02** on GitHub · 2026-11-24 16:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#issuecomment-7137876261) Thanks — no P1/P2 and both nits were fair. Fixed in `e6d94835`; the review was on `c259252e`, so it predates the float-spelling fix Codex raised separately. **Positive coverage in every mode.** `controls()` now lowers the integer write and both float-spelled spellings and requires each to equal the untouched kernel: ```python untouched = aot.lower(INDEXED, 32, **INDEX_BINDING) for lines in [SCRATCH_BASE_WRITE_LINES] + [[spelling] + INDEXED for spelling in SCRATCH_BASE_WRITE_SPELLINGS]: assert aot.lower(lines, 32, **INDEX_BINDING) == untouched, lines[0] ``` That also covers `HW_REG_FLAT_SCR_HI` positively (the `0.15915494` spelling writes HI), so it is no longer only a rejection case. `controls()` runs before mode dispatch, which is what the binary mode exercises first; I verified it by importing the module and calling `controls()` directly — `controls ok, 2 extra spellings positively covered` — since I do not have LLVM here to run the full binary mode. **Docstring.** The stray `"` is gone. ``` dev: compute_store_aot_warp Passed 7.39 s, compute_store_aot_scratch_base_warp Passed 4.02 s release: compute_store_aot_warp Passed 7.44 s, compute_store_aot_scratch_base_warp Passed 3.95 s ``` Your mutation check is the right one for the hwreg split; mine only removed the acceptance entirely, so narrowing LO/HI was not covered locally. Thanks for both.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 16:49 UTC · original

Verified at e6d94835. The lowering accepts LLVM floating spellings, and the source-built low/high cases including 1.0 and 0.15915494 produce identical HLSL. Direct reads, scratch memory and nonliteral operands remain refused. The related Windows Release checks passed on RTX and WARP (4/4).

**@⁠R0Y00** on GitHub · 2026-11-24 16:49 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#discussion_r4683430035) Verified at e6d94835. The lowering accepts LLVM floating spellings, and the source-built low/high cases including 1.0 and 0.15915494 produce identical HLSL. Direct reads, scratch memory and nonliteral operands remain refused. The related Windows Release checks passed on RTX and WARP (4/4).
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 16:25 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c259252e11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 16:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#pullrequestreview-6043206111) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `c259252e11` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 16:32 UTC · original · reviewed

Peer review on c259252e:

Findings

No P1 or P2 defects found.

  • tools/compute_store_aot.py accepts only the whole-register immediate s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_(?:LO|HI)), ... form, after ds_wait (s_waitcnt lgkmcnt(0)) and outside lane-guard restore blocks. No s_getreg_b32, scratch_*, or flat_* consumer is accepted by the compute lowering, so the write has no observable consumer.
  • Title-neutrality: clean.

Nits:

  • tests/compute_store_check.py: binary mode (Linux) only runs the negative must_reject checks in controls() and does not exercise positive lowering of SCRATCH_BASE_WRITE_LINES (which runs in draw_scratch_base_write on Windows). Also, HW_REG_FLAT_SCR_HI only appears in a must_reject case (stride=8), so positive HW_REG_FLAT_SCR_HI lowering is not directly covered.
  • tests/compute_store_check.py: stray " at the end of the first line of draw_scratch_base_write's docstring.

Verification

  • Linux:
    • python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM.so.19.1 — PASS (exit 0).
  • Win2025 (OS build 26100, MSVC 14.44.35207, WARP; *_hardware excluded):
    • Debug (--preset dev): cmake --build --preset dev --target offscreen_check -- -j 6 (30.14s), ctest --preset dev -R '^(...|compute_store_aot_scratch_base_warp|...)$' --parallel 4 --no-tests=error --output-on-failure — 55/55 passed (77.57s; compute_store_aot_scratch_base_warp 4.17s).
    • Release /O2 (--preset release): cmake --build --preset release --target offscreen_check -- -j 6 (51.82s), ctest --preset release -R '^(...|compute_store_aot_scratch_base_warp|...)$' --parallel 4 --no-tests=error --output-on-failure — 55/55 passed (77.33s; compute_store_aot_scratch_base_warp 4.31s).
  • Local mutation check:
    • Temporarily narrowed HW_REG_FLAT_SCR_(?:LO|HI) to HW_REG_FLAT_SCR_HI in tools/compute_store_aot.py; draw_scratch_base_write failed as expected (ValueError: Unsupported compute instruction: s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO), 0, exit 1). Restored cleanly (git status --short clean).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 16:32 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1655#pullrequestreview-6043317275) · **reviewed** Peer review on `c259252e`: ### Findings No P1 or P2 defects found. - `tools/compute_store_aot.py` accepts only the whole-register immediate `s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_(?:LO|HI)), ...` form, after `ds_wait` (`s_waitcnt lgkmcnt(0)`) and outside lane-guard restore blocks. No `s_getreg_b32`, `scratch_*`, or `flat_*` consumer is accepted by the compute lowering, so the write has no observable consumer. - Title-neutrality: clean. **Nits:** - `tests/compute_store_check.py`: `binary` mode (Linux) only runs the negative `must_reject` checks in `controls()` and does not exercise positive lowering of `SCRATCH_BASE_WRITE_LINES` (which runs in `draw_scratch_base_write` on Windows). Also, `HW_REG_FLAT_SCR_HI` only appears in a `must_reject` case (`stride=8`), so positive `HW_REG_FLAT_SCR_HI` lowering is not directly covered. - `tests/compute_store_check.py`: stray `"` at the end of the first line of `draw_scratch_base_write`'s docstring. ### Verification - **Linux**: - `python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM.so.19.1` — **PASS** (exit 0). - **Win2025 (OS build 26100, MSVC 14.44.35207, WARP; `*_hardware` excluded)**: - **Debug (`--preset dev`)**: `cmake --build --preset dev --target offscreen_check -- -j 6` (`30.14s`), `ctest --preset dev -R '^(...|compute_store_aot_scratch_base_warp|...)$' --parallel 4 --no-tests=error --output-on-failure` — **55/55 passed** (`77.57s`; `compute_store_aot_scratch_base_warp` `4.17s`). - **Release `/O2` (`--preset release`)**: `cmake --build --preset release --target offscreen_check -- -j 6` (`51.82s`), `ctest --preset release -R '^(...|compute_store_aot_scratch_base_warp|...)$' --parallel 4 --no-tests=error --output-on-failure` — **55/55 passed** (`77.33s`; `compute_store_aot_scratch_base_warp` `4.31s`). - **Local mutation check**: - Temporarily narrowed `HW_REG_FLAT_SCR_(?:LO|HI)` to `HW_REG_FLAT_SCR_HI` in `tools/compute_store_aot.py`; `draw_scratch_base_write` failed as expected (`ValueError: Unsupported compute instruction: s_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO), 0`, exit 1). Restored cleanly (`git status --short` clean). AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.