shader: derive the scanner's pixel ALU forms from pixel_aot #300

Manually merged
github merged 1 commit from gh-pr/300/head into gh-pr/300/base 2026-11-26 21:41:20 +00:00
Owner

@⁠Vonsek on GitHub · 2026-11-21 21:26 UTC · original
Vonsek:pso-scanner-pixel-forms → main · +26 −6 · 2 files · 1 commits · merged 2026-11-21 21:56 UTC

Change

tools/scan_unsupported_shaders.py kept its own list of vector ALU opcodes. It had drifted from pixel_aot.ALU: v_floor_f32, v_fract_f32 and v_trunc_f32 were not recognized, so pso_readiness reported unsupported_opcodes for pipelines that pixel_aot already lowers. The supported-instruction regex also omitted the add/mul/sqrt/rsq/floor/fract/trunc/subrev forms.

The scanner now builds SUPPORTED_ALU, the supported-instruction regex alternation and the recognized opcode set from pixel_aot.ALU. pixel_aot was already imported by the scanner, so there is no new dependency or import cycle.

PRs that add entries to pixel_aot.ALU (#274, #169, #232, #257) need no scanner edit once this lands. #274 also edits the scanner opcode list; its ceil/rndne entries become redundant but do not conflict semantically.

Verification

  • python -B tests/pso_readiness_check.py: a pipeline whose shader uses v_floor_f32, v_fract_f32, v_trunc_f32, v_add_f32 and v_mul_f32 is needs_pso_validation; a new check asserts every pixel_aot.ALU entry is recognized and supported by the scanner.
  • Without the scanner change the same test fails: the pipeline is blocked with unsupported_opcodes: v_floor_f32_e32, v_fract_f32_e32, v_trunc_f32_e32, and the drift check fails on v_sqrt_f32.
  • Windows: ctest --preset dev --no-tests=error -R '^pso_readiness_check$' -V at 02dbbd4 on Windows 11 build 26200.9974, VS Build Tools 2022 17.14 (MSVC 14.44.35207), Windows SDK 10.0.26100, Python 3.12: passed. tests/rdna2_tools_check.py also passes (27 tests, 1 skipped). The full ctest --preset dev --no-tests=error passed 136/136, with bvh_wave64_hardware, bvh_wave64_warp and wave_shuffle_warp skipped.

Evidence and follow-up

Only entries in pixel_aot.ALU are derived. Other lowered families (compares, conversions, scalar ops) still rely on the scanner's own lists; the compare family is already covered by the v_cmp_ prefix rule.

**@⁠Vonsek** on GitHub · 2026-11-21 21:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/300) `Vonsek:pso-scanner-pixel-forms` → `main` · +26 −6 · 2 files · 1 commits · merged 2026-11-21 21:56 UTC ## Change `tools/scan_unsupported_shaders.py` kept its own list of vector ALU opcodes. It had drifted from `pixel_aot.ALU`: `v_floor_f32`, `v_fract_f32` and `v_trunc_f32` were not recognized, so `pso_readiness` reported `unsupported_opcodes` for pipelines that `pixel_aot` already lowers. The supported-instruction regex also omitted the add/mul/sqrt/rsq/floor/fract/trunc/subrev forms. The scanner now builds `SUPPORTED_ALU`, the supported-instruction regex alternation and the recognized opcode set from `pixel_aot.ALU`. `pixel_aot` was already imported by the scanner, so there is no new dependency or import cycle. PRs that add entries to `pixel_aot.ALU` (#274, #169, #232, #257) need no scanner edit once this lands. #274 also edits the scanner opcode list; its ceil/rndne entries become redundant but do not conflict semantically. ## Verification - `python -B tests/pso_readiness_check.py`: a pipeline whose shader uses `v_floor_f32`, `v_fract_f32`, `v_trunc_f32`, `v_add_f32` and `v_mul_f32` is `needs_pso_validation`; a new check asserts every `pixel_aot.ALU` entry is recognized and supported by the scanner. - Without the scanner change the same test fails: the pipeline is blocked with `unsupported_opcodes: v_floor_f32_e32, v_fract_f32_e32, v_trunc_f32_e32`, and the drift check fails on `v_sqrt_f32`. - Windows: `ctest --preset dev --no-tests=error -R '^pso_readiness_check$' -V` at 02dbbd4 on Windows 11 build 26200.9974, VS Build Tools 2022 17.14 (MSVC 14.44.35207), Windows SDK 10.0.26100, Python 3.12: passed. `tests/rdna2_tools_check.py` also passes (27 tests, 1 skipped). The full `ctest --preset dev --no-tests=error` passed 136/136, with `bvh_wave64_hardware`, `bvh_wave64_warp` and `wave_shuffle_warp` skipped. ## Evidence and follow-up Only entries in `pixel_aot.ALU` are derived. Other lowered families (compares, conversions, scalar ops) still rely on the scanner's own lists; the compare family is already covered by the `v_cmp_` prefix rule.
pso_readiness blocked pipelines that use v_floor_f32, v_fract_f32 and
v_trunc_f32 because the scanner kept its own list of ALU opcodes. Build
the scanner's recognized and supported ALU forms from pixel_aot.ALU, so
instructions added to that table are accepted without a scanner edit.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:41:18 +00:00
github manually merged commit 02dbbd4910 into gh-pr/300/base 2026-11-26 21:41:20 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-21 21:31 UTC · original · edited 2026-11-21 21:33 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-21T21:33:04.284989Z 02dbbd4 Draft marked ready
ℹ️ 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-21 21:31 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/300#issuecomment-7069530672) · edited 2026-11-21 21:33 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"02dbbd491038e3904c29af00876f8206c9f45fb6","has_any_findings":false,"has_unresolved_findings":false,"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-21T21:33:04.284989Z">2026-11-21T21:33:04.284989Z</relative-time> | `02dbbd4` | Draft marked ready | <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>
This discussion has been locked. Commenting is limited to contributors.
No description provided.