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

Merged
Vonsek merged 1 commit from upstream-pr/300 into main 2026-11-21 21:56:00 +00:00
Vonsek commented 2026-11-21 21:26:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:26:44Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6534591198 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/300). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T21:26:44Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:42:19 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:48:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:31:11Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7069530672 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/300#issuecomment-7069530672). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T21:31:11Z. --- <!-- 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>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!296
No description provided.