CLI: report all varying descriptor-word opcodes in translation refusals #672

Closed
github-bot wants to merge 5 commits from gh-pr/672/head into gh-pr/672/base
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 06:31 UTC · original
MichaelSmithAI:feature/computed-descriptor-report → main · +194 −14 · 4 files · 5 commits · closed without merging

The census in #566 leaves 38 shaders at the same refusal when a descriptor read from the first lane depends on computed vector registers. This opt-in CLI report lets testers see which operations account for those shaders before choosing another compiler change. It incorporates the review on the contributor's fork.

The prerequisite #566 has merged into main. The Files changed tab now shows the diagnostic, its regression test, the CLI option and the README usage.

Run victory translate <local-path> --descriptor-failures on the same inputs as the census. Each row gives a program count, the first varying word's defining opcode, the opcode or source category for every varying word in descriptor order, and the source class of every descriptor word. The scan deduplicates inputs and records at most one refusal per program. The output contains aggregate categories only. This mode stops after resource tracking.

A source-built shader computes two separate descriptor words with OR and XOR. The regression checks both opcode positions, the six other word sources and the same refusal with diagnostics disabled. After merging main at ffe310e, the Linux shader library suite passed 97 tests with one ignored. Windows-target workspace Clippy passed with all targets and features using the pure Rust BLAKE3 backend. The asset policy passed for 154 files. The actual 38-program distribution awaits a tester with the local inputs.

AI assistance was used for implementation and verification.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 06:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/672) `MichaelSmithAI:feature/computed-descriptor-report` → `main` · +194 −14 · 4 files · 5 commits · closed without merging The census in #566 leaves 38 shaders at the same refusal when a descriptor read from the first lane depends on computed vector registers. This opt-in CLI report lets testers see which operations account for those shaders before choosing another compiler change. It incorporates the [review on the contributor's fork](https://github.com/r4tedx/VIctory/pull/4). The prerequisite #566 has merged into main. The Files changed tab now shows the diagnostic, its regression test, the CLI option and the README usage. Run `victory translate <local-path> --descriptor-failures` on the same inputs as the census. Each row gives a program count, the first varying word's defining opcode, the opcode or source category for every varying word in descriptor order, and the source class of every descriptor word. The scan deduplicates inputs and records at most one refusal per program. The output contains aggregate categories only. This mode stops after resource tracking. A source-built shader computes two separate descriptor words with OR and XOR. The regression checks both opcode positions, the six other word sources and the same refusal with diagnostics disabled. After merging main at `ffe310e`, the Linux shader library suite passed 97 tests with one ignored. Windows-target workspace Clippy passed with all targets and features using the pure Rust BLAKE3 backend. The asset policy passed for 154 files. The actual 38-program distribution awaits a tester with the local inputs. AI assistance was used for implementation and verification.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:12:28 +00:00
github-bot closed this pull request 2026-11-26 04:12:28 +00:00
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 08:58 UTC · original

Thanks @⁠LAKSHYA-cmd-tech and @⁠catminou4 for running the report and tests on Windows and macOS, and for documenting the extra macOS build dependency.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 08:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/672#issuecomment-7126804508) Thanks @⁠LAKSHYA-cmd-tech and @⁠catminou4 for running the report and tests on Windows and macOS, and for documenting the extra macOS build dependency.
Author
Owner

@⁠ErRusso on GitHub · 2026-11-24 11:23 UTC · original

Audit: ✅ Looks good — verified & tested

Reviewed this PR as part of an audit of mergeable PRs.

  • Scope: apps/victory/src/translate.rs + crates/victory-shader/src/resource.rs (+183/-5). Adds --descriptor-failures flag to victory translate that aggregates DescriptorFailure records by opcode, varying opcode sequence, and descriptor-word source category — containing no program code, registers, or addresses. Useful for identifying shaders blocked by computed per-lane descriptors without the noise of full translation failure output.
  • Merges cleanly into main.
  • Tests: cargo test -p victory-shader -- resource::tests → 30/30 passed including the new computed_descriptor_failure_reports_only_opcode_and_word_sources which validates that synthetic v_or_b32 / v_xor_b32 instructions produce correctly categorized DescriptorFailure entries.
  • Data safety: The DescriptorFailure struct deliberately leaks no code bytes, register numbers, or addresses — just &'static str categories. descriptor_word_source() maps each word to one of "constant", "input", "phi", "scalar-load", "global-load", "buffer-load", "lds-read", "computed". Good.
  • UX note: The output format groups programs in a BTreeMap and prints count | opcode | varying_opcodes | sources — clean and useful for triaging.

No issues found.

**@⁠ErRusso** on GitHub · 2026-11-24 11:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/672#issuecomment-7130036633) ## Audit: ✅ Looks good — verified & tested Reviewed this PR as part of an audit of mergeable PRs. - **Scope:** `apps/victory/src/translate.rs` + `crates/victory-shader/src/resource.rs` (+183/-5). Adds `--descriptor-failures` flag to `victory translate` that aggregates `DescriptorFailure` records by opcode, varying opcode sequence, and descriptor-word source category — containing no program code, registers, or addresses. Useful for identifying shaders blocked by computed per-lane descriptors without the noise of full translation failure output. - **Merges cleanly** into `main`. - **Tests:** `cargo test -p victory-shader -- resource::tests` → **30/30 passed** including the new `computed_descriptor_failure_reports_only_opcode_and_word_sources` which validates that synthetic `v_or_b32` / `v_xor_b32` instructions produce correctly categorized `DescriptorFailure` entries. - **Data safety:** The `DescriptorFailure` struct deliberately leaks no code bytes, register numbers, or addresses — just `&'static str` categories. `descriptor_word_source()` maps each word to one of `"constant"`, `"input"`, `"phi"`, `"scalar-load"`, `"global-load"`, `"buffer-load"`, `"lds-read"`, `"computed"`. Good. - **UX note:** The output format groups programs in a BTreeMap and prints `count | opcode | varying_opcodes | sources` — clean and useful for triaging. No issues found.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:27 UTC · original

Automated triage for the maintainers. Closing because this change is already in main, or main has since replaced the code it patches.

the same opt-in CLI breakdown of 'a descriptor read from the first lane of computed VGPRs' (small argument changes, README section); that class went 38 -> 0 on the title's programs in main, so the report has nothing to show.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/672#issuecomment-7148526046) Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has since replaced the code it patches. the same opt-in CLI breakdown of 'a descriptor read from the first lane of computed VGPRs' (small argument changes, README section); that class went 38 -> 0 on the title's programs in main, so the report has nothing to show. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!672
No description provided.