CLI: report all varying descriptor-word opcodes in translation refusals #672
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/672"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T06:31:39Z.
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-failureson 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.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T06:42:03Z.
Review: APPROVED
LGTM! Tested on Windows 11 with MSVC Rust 1.98.1. All 99 tests in ictory-shader and integration tests in ictory pass cleanly. Opt-in --descriptor-failures CLI report cleanly categorizes varying descriptor-word opcodes without overhead on standard translation.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:42:17Z.
Review: APPROVED
Verified locally on macOS 26 arm64, rustc 1.98.1 (aarch64-apple-darwin, rust-toolchain.toml):
cargo test -p victory-shader --lockedat headd61daaa: 82 passed, 0 failedcargo check -p victory --locked: clean — note main does not compile the app crate on macOS at all (the knownhost_resourcecfg issue in victory-gpu, fixed by #235/#523), so I checked with #235's head merged in locally (uncommitted, only for verification). The translate.rs CLI changes compile and the shader side is fully tested.Approving.
Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T08:58:56Z.
Thanks @LAKSHYA-cmd-tech and @catminou4 for running the report and tests on Windows and macOS, and for documenting the extra macOS build dependency.
Imported from Marvisak/VIctory. Originally posted by ErRusso on 2026-11-24T11:23:32Z.
Audit: ✅ Looks good — verified & tested
Reviewed this PR as part of an audit of mergeable PRs.
apps/victory/src/translate.rs+crates/victory-shader/src/resource.rs(+183/-5). Adds--descriptor-failuresflag tovictory translatethat aggregatesDescriptorFailurerecords 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.main.cargo test -p victory-shader -- resource::tests→ 30/30 passed including the newcomputed_descriptor_failure_reports_only_opcode_and_word_sourceswhich validates that syntheticv_or_b32/v_xor_b32instructions produce correctly categorizedDescriptorFailureentries.DescriptorFailurestruct deliberately leaks no code bytes, register numbers, or addresses — just&'static strcategories.descriptor_word_source()maps each word to one of"constant","input","phi","scalar-load","global-load","buffer-load","lds-read","computed". Good.count | opcode | varying_opcodes | sources— clean and useful for triaging.No issues found.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:27:15Z.
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas 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