Shaders: name the operation kind a whole-wave section the simulation cannot follow #2342

Open
borosf wants to merge 1 commit from upstream-pr/2344 into main
borosf commented 2026-11-25 11:12:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-25T11:12:51Z.


Summary

  • The whole-wave section simulation (crates/victory-shader/src/emit/wave.rs) now records the first
    step it cannot follow, classified by operation kind (DPP over lanes it has not named, a DPP pattern
    it does not model, source modifiers, a lane set written another way, a select on a mask it does not
    name, a lane permutation, a fixed-lane read, a lane swizzle, a shared-memory step, an unmodelled
    operation) on a new Section::unknown.
  • Lower::section_inst (crates/victory-shader/src/emit/lower.rs) reports that kind as the program's
    refusal instead of the single generic a whole-wave section step the simulation does not follow,
    so victory translate --list tabulates refused programs by the class of step that needs support.
  • This is the logging half of #1317 H-6.3 / FIND-7 ("Log refusals by operation kind, then
    implement"): the counts tell which intra-half cross-lane operation support would move the most
    refused programs.

claiming: FIND-7 (H-6.3, the logging step first; commenting from this account is blocked by the
integration's permissions, so the claim rides this pull request).

Verification

  • cargo test -p victory-shader --lib — 145 passed, 0 failed (includes the new
    unmodelled_steps_are_named_by_operation_kind, wave32 and wave64).
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings — error set identical to
    pristine main (940d32f); the remaining 4 are pre-existing non-Windows gating warnings, CI's
    windows-latest run is unaffected; no new warnings introduced.
  • cargo run -p xtask --locked -- policy — 182 files ok.
  • No game data used; the change runs on the pure translation pipeline (victory translate --list
    consumes the new reasons unchanged).
<!-- greyfinch-sync:Marvisak/VIctory:issue:6603188290 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2344). Originally posted by [borosf](https://github.com/borosf) on 2026-11-25T11:12:51Z. --- ## Summary - The whole-wave section simulation (`crates/victory-shader/src/emit/wave.rs`) now records the first step it cannot follow, classified by operation kind (DPP over lanes it has not named, a DPP pattern it does not model, source modifiers, a lane set written another way, a select on a mask it does not name, a lane permutation, a fixed-lane read, a lane swizzle, a shared-memory step, an unmodelled operation) on a new `Section::unknown`. - `Lower::section_inst` (`crates/victory-shader/src/emit/lower.rs`) reports that kind as the program's refusal instead of the single generic `a whole-wave section step the simulation does not follow`, so `victory translate --list` tabulates refused programs by the class of step that needs support. - This is the logging half of #1317 **H-6.3** / **FIND-7** ("Log refusals by operation kind, then implement"): the counts tell which intra-half cross-lane operation support would move the most refused programs. > claiming: **FIND-7** (H-6.3, the logging step first; commenting from this account is blocked by the > integration's permissions, so the claim rides this pull request). ## Verification - `cargo test -p victory-shader --lib` — **145 passed, 0 failed** (includes the new `unmodelled_steps_are_named_by_operation_kind`, wave32 and wave64). - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings` — error set identical to pristine `main` (`940d32f`); the remaining 4 are pre-existing non-Windows gating warnings, CI's `windows-latest` run is unaffected; no new warnings introduced. - `cargo run -p xtask --locked -- policy` — **182 files ok**. - No game data used; the change runs on the pure translation pipeline (`victory translate --list` consumes the new reasons unchanged).
DenRakEiw commented 2026-11-25 11:26:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T11:26:25Z.

Review: APPROVED


Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:

  • Naming unmodelled whole-wave simulation steps by operation kind provides clearer diagnostics while preserving existing prefix/DPP recognition.
  • cargo test -p victory-shader emit::wave: 7/7 passed on RTX 5090, 7/7 passed on WARP (including unmodelled_steps_are_named_by_operation_kind).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.
  • cargo xtask policy: 183 files ok.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6056760925 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2344#pullrequestreview-6056760925). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T11:26:25Z. **Review:** APPROVED --- Verified against `origin/main` (`940d32f`) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP: - Naming unmodelled whole-wave simulation steps by operation kind provides clearer diagnostics while preserving existing prefix/DPP recognition. - `cargo test -p victory-shader emit::wave`: 7/7 passed on RTX 5090, 7/7 passed on WARP (including `unmodelled_steps_are_named_by_operation_kind`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: 0 warnings. - `cargo xtask policy`: 183 files ok. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 11:51:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T11:51:52Z.

Review: APPROVED


Tested locally: merged into main 940d32f69b, cargo test -p victory-shader --locked on macOS arm64 — 145 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — operation kind named for whole-wave sections in simulation.

<!-- greyfinch-sync:Marvisak/VIctory:review:6057088193 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2344#pullrequestreview-6057088193). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T11:51:52Z. **Review:** APPROVED --- Tested locally: merged into main 940d32f69b, `cargo test -p victory-shader --locked` on macOS arm64 — 145 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — operation kind named for whole-wave sections in simulation.
Marvisak commented 2026-11-25 16:09:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:29:57Z.


Automated triage for the maintainers.

Merge candidate (diagnostics). This records the first step the whole-wave section simulation in emit/wave.rs (simulate) cannot follow, as a reason per operation kind on the new Section::unknown, and Lower::section_inst reports it in place of the single generic reason, so victory translate --list can group refused programs by what needs support. Shapes and lowering are unchanged, and the generic reason stays when nothing was recorded. I checked that each new reason is set exactly where main already produced Sym::Unknown, and that values unknown only because an input was unknown don't overwrite the root cause. Only the first of several independent unknown steps is named, which is fine for a census. The new test covers wave32 and wave64. CI: passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7166936772 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2344#issuecomment-7166936772). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T15:29:57Z. --- <!-- victory-triage v1 head=751cbe3e4158bf2aeb1a1fa52097e80bcfc769a2 verdict=merge-candidate at=2026-11-25T15:30:00Z --> Automated triage for the maintainers. **Merge candidate (diagnostics).** This records the first step the whole-wave section simulation in `emit/wave.rs` (`simulate`) cannot follow, as a reason per operation kind on the new `Section::unknown`, and `Lower::section_inst` reports it in place of the single generic reason, so `victory translate --list` can group refused programs by what needs support. Shapes and lowering are unchanged, and the generic reason stays when nothing was recorded. I checked that each new reason is set exactly where `main` already produced `Sym::Unknown`, and that values unknown only because an input was unknown don't overwrite the root cause. Only the first of several independent unknown steps is named, which is fine for a census. The new test covers wave32 and wave64. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
fuzeofficlal commented 2026-11-26 02:10:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T02:10:48Z.

Review: COMMENTED


Reviewed and verified against main (63bcca43) on Windows 11 — clean diagnostic improvement and ready to merge:

  • Recording the first unmodelled step kind in wave::simulate (ds_swizzle/ds_permute, other ds_*, general unmodelled ops, non-constant EXEC) and forwarding it to Val::Missing in lower.rs:1115-1127 gives victory translate --list actionable buckets without dropping other tracked register shapes.
  • emit/lower.rs size on 63bcca43: 520,811 B (+248 B, 3,477 B under the 512 KiB cap).

Local verification:

  • cargo test --locked -p victory-shader --lib emit::wave:: emit::lower::tests: 41/41 passed (including unmodelled_steps_are_named_by_operation_kind for wave32 and wave64)
  • cargo clippy --all-targets -- -D warnings + cargo xtask policy (191 files ok): 0 warnings
<!-- greyfinch-sync:Marvisak/VIctory:review:6067626937 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2344#pullrequestreview-6067626937). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T02:10:48Z. **Review:** COMMENTED --- Reviewed and verified against `main` (`63bcca43`) on Windows 11 — clean diagnostic improvement and ready to merge: - Recording the first unmodelled step kind in `wave::simulate` (`ds_swizzle`/`ds_permute`, other `ds_*`, general unmodelled ops, non-constant `EXEC`) and forwarding it to `Val::Missing` in `lower.rs:1115-1127` gives `victory translate --list` actionable buckets without dropping other tracked register shapes. - `emit/lower.rs` size on `63bcca43`: **520,811 B** (`+248 B`, **3,477 B** under the 512 KiB cap). **Local verification**: - `cargo test --locked -p victory-shader --lib emit::wave:: emit::lower::tests`: **41/41 passed** (including `unmodelled_steps_are_named_by_operation_kind` for wave32 and wave64) - `cargo clippy --all-targets -- -D warnings` + `cargo xtask policy` (`191 files ok`): 0 warnings
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2344:upstream-pr/2344'
git switch 'upstream-pr/2344'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2344'
git switch 'upstream-pr/2344'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2344'
git switch 'upstream-pr/2344'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2344'
git switch 'main'
git merge --squash 'upstream-pr/2344'
git switch 'main'
git merge --ff-only 'upstream-pr/2344'
git switch 'main'
git merge 'upstream-pr/2344'
git push origin 'main'
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
Marvisak/VIctory!2342
No description provided.