CLI: separate root-signature failures in victory translate --pipelines (#885) #2155

Closed
fuzeofficlal wants to merge 1 commit from upstream-pr/2157 into main
fuzeofficlal commented 2026-11-25 06:29:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T06:29:41Z.


Summary

Separates root-signature serialization and creation failures from Create*PipelineState rejections in victory translate --pipelines (#885):

  • emit::host::Host::root_signature_for (crates/victory-shader/src/emit/host.rs) prefixes D3D12SerializeVersionedRootSignature and CreateRootSignature failures with root signature:, surfaces the serializer's error blob message (blob_err), and notes when the root-parameter dword total (user_data_dwords().max(1) per stage + 2 * views.len()) exceeds the 64-dword D3D12 root-signature budget on serializer errors while preserving the driver's own error on CreateRootSignature.
  • pipeline_failure (apps/victory/src/translate.rs) keeps root signature: failures in their own tally bucket rather than prefixing them with pipeline:, so 0x80070057 (E_INVALIDARG) from root-signature creation is not conflated with PSO rejection.

Verification

  • cargo test -p victory-shader --lib --locked -- host
  • cargo test -p victory --locked
  • cargo clippy --workspace --lib --tests --all-features --locked -- -D warnings
  • cargo xtask policy

Refs #885

<!-- greyfinch-sync:Marvisak/VIctory:issue:6598666501 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T06:29:41Z. --- ### Summary Separates root-signature serialization and creation failures from `Create*PipelineState` rejections in `victory translate --pipelines` (#885): - `emit::host::Host::root_signature_for` (`crates/victory-shader/src/emit/host.rs`) prefixes `D3D12SerializeVersionedRootSignature` and `CreateRootSignature` failures with `root signature:`, surfaces the serializer's error blob message (`blob_err`), and notes when the root-parameter dword total (`user_data_dwords().max(1)` per stage + `2 * views.len()`) exceeds the 64-dword D3D12 root-signature budget on serializer errors while preserving the driver's own error on `CreateRootSignature`. - `pipeline_failure` (`apps/victory/src/translate.rs`) keeps `root signature:` failures in their own tally bucket rather than prefixing them with `pipeline:`, so `0x80070057` (`E_INVALIDARG`) from root-signature creation is not conflated with PSO rejection. ### Verification - `cargo test -p victory-shader --lib --locked -- host` - `cargo test -p victory --locked` - `cargo clippy --workspace --lib --tests --all-features --locked -- -D warnings` - `cargo xtask policy` Refs #885
catminou4 commented 2026-11-25 07:02:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T06:33:11Z.

Review: COMMENTED


Static review only: CLI/translate path — the shader crate half compiles on macOS but this PR's change is apps-side error reporting.

Distinguish root-signature vs wave-lane failures in translate output — error-message clarity; mixed apps+shader.

<!-- greyfinch-sync:Marvisak/VIctory:review:6052890625 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#pullrequestreview-6052890625). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T06:33:11Z. **Review:** COMMENTED --- Static review only: CLI/translate path — the shader crate half compiles on macOS but this PR's change is apps-side error reporting. Distinguish root-signature vs wave-lane failures in translate output — error-message clarity; mixed apps+shader.
catminou4 commented 2026-11-25 07:02:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T06:49:58Z.

Review: APPROVED


Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, cargo test -p victory-shader --locked.

144 passed / 0 failed / 2 ignored. translate errors distinguish root-signature vs wave-lane failures — shader crate side of the CLI diagnostics; apps half Windows-only.

<!-- greyfinch-sync:Marvisak/VIctory:review:6053076232 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#pullrequestreview-6053076232). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T06:49:58Z. **Review:** APPROVED --- Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, `cargo test -p victory-shader --locked`. 144 passed / 0 failed / 2 ignored. translate errors distinguish root-signature vs wave-lane failures — shader crate side of the CLI diagnostics; apps half Windows-only.
Dathinel commented 2026-11-25 07:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-25T06:38:11Z.


Checked the wave diagnostic against native Windows D3D12 on an RTX 3050 Laptop (driver 32.0.16.1062, 32-lane waves). I compiled three otherwise identical compute shaders with Windows SDK DXC 10.0.26100.0 (-T cs_6_6, [numthreads(64,1,1)], one UAV receiving WaveGetLaneCount()). All three embedded root signatures were accepted before checking pipeline creation.

Wave attribute Parent 940d32f PR 9771cae
None Pipeline created Pipeline created
[WaveSize(32)] Pipeline created Pipeline created
[WaveSize(64)] El parámetro no es correcto. shader requires 64-lane waves (device supports 32)

This also checks the parser against PSV0 emitted by SDK DXC, independently of the project's own emitter. The measurement ends at Host::compute_pipeline_with; I didn't dispatch the shaders or attribute any of the failures in #885 to this cause. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154998478 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7154998478). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-25T06:38:11Z. --- Checked the wave diagnostic against native Windows D3D12 on an RTX 3050 Laptop (driver 32.0.16.1062, 32-lane waves). I compiled three otherwise identical compute shaders with Windows SDK DXC 10.0.26100.0 (`-T cs_6_6`, `[numthreads(64,1,1)]`, one UAV receiving `WaveGetLaneCount()`). All three embedded root signatures were accepted before checking pipeline creation. | Wave attribute | Parent `940d32f` | PR `9771cae` | |---|---|---| | None | Pipeline created | Pipeline created | | `[WaveSize(32)]` | Pipeline created | Pipeline created | | `[WaveSize(64)]` | `El parámetro no es correcto.` | `shader requires 64-lane waves (device supports 32)` | This also checks the parser against PSV0 emitted by SDK DXC, independently of the project's own emitter. The measurement ends at `Host::compute_pipeline_with`; I didn't dispatch the shaders or attribute any of the failures in #885 to this cause. AI-assisted.
sinan-cmyk commented 2026-11-25 09:06:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T08:09:25Z.


Offline measurement on a retail dump

Result: no count change against main.

I merged head 9771cae5 onto main 940d32f (clean merge) and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with main program by program (25,889 programs). Validated: 23,918 on main, 23,918 with this PR.

No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.

No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156674391 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7156674391). Originally posted by [sinan-cmyk](https://github.com/sinan-cmyk) on 2026-11-25T08:09:25Z. --- ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head 9771cae5 onto `main` 940d32f (clean merge) and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with `main` program by program (25,889 programs). Validated: 23,918 on `main`, 23,918 with this PR. No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
upstream-sync changed title from [PR #2157] CLI: distinguish root-signature and wave-lane failures in translate --pipelines to [PR #2157] CLI: separate root-signature failures in victory translate --pipelines (#885) 2026-11-25 12:03:06 +00:00
Marvisak commented 2026-11-25 12:03:45 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Merge candidate. Thanks for c0b8b72. The PR is now limited to the root-signature part, so it no longer overlaps #223.

What it does, all in the offline victory translate / test host (emit::host::Host, crates/victory-shader/src/emit/host.rs):

  • root_signature_for prefixes serializer and CreateRootSignature errors with root signature:, and surfaces the serializer's own error text (blob_err).
  • CreateRootSignature failures keep the driver's message, as asked.
  • The over-budget note applies only to the serializer path, where the dword count is known. That count matches the parameters built just below: one root-constants parameter of user_data_dwords().max(1) per stage, plus 2 per root view.
  • pipeline_failure in apps/victory/src/translate.rs keeps these errors out of the pipeline: bucket.

The tests check both buckets, plus a real over-budget signature on WARP. CI check passes at c0b8b72.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7161007601 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7161007601). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T11:24:33Z. --- <!-- victory-triage v1 head=c0b8b72c3bc032c4ccb53621875b49885629b3cf verdict=merge-candidate at=2026-11-25T13:18:00Z --> Automated triage for the maintainers. **Merge candidate.** Thanks for `c0b8b72`. The PR is now limited to the root-signature part, so it no longer overlaps #223. What it does, all in the offline `victory translate` / test host (`emit::host::Host`, `crates/victory-shader/src/emit/host.rs`): - `root_signature_for` prefixes serializer and `CreateRootSignature` errors with `root signature:`, and surfaces the serializer's own error text (`blob_err`). - `CreateRootSignature` failures keep the driver's message, as asked. - The over-budget note applies only to the serializer path, where the dword count is known. That count matches the parameters built just below: one root-constants parameter of `user_data_dwords().max(1)` per stage, plus 2 per root view. - `pipeline_failure` in `apps/victory/src/translate.rs` keeps these errors out of the `pipeline:` bucket. The tests check both buckets, plus a real over-budget signature on WARP. CI `check` passes at `c0b8b72`. --- _Generated by [Claude Code](https://claude.ai/code)_
fuzeofficlal commented 2026-11-25 12:03:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T12:00:26Z.


Updated in c0b8b72c per triage feedback:

  1. Removed the PSV0 wave-lane pre-check (psv_wave_range, wave_lane_mismatch, Host::wave_lanes, check_wave_lanes, and its tests) so this PR is focused solely on separating root signature: failures and avoids overlapping/conflicting with #223.
  2. Kept the driver's own error message on CreateRootSignature (format!("root signature: {}", err(e))) without guessing dwords > 64 there.
  3. Updated the PR title and description accordingly.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7161794328 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7161794328). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T12:00:26Z. --- Updated in `c0b8b72c` per triage feedback: 1. Removed the PSV0 wave-lane pre-check (`psv_wave_range`, `wave_lane_mismatch`, `Host::wave_lanes`, `check_wave_lanes`, and its tests) so this PR is focused solely on separating `root signature:` failures and avoids overlapping/conflicting with #223. 2. Kept the driver's own error message on `CreateRootSignature` (`format!("root signature: {}", err(e))`) without guessing `dwords > 64` there. 3. Updated the PR title and description accordingly.
upstream-sync closed this pull request 2026-11-25 23:03:55 +00:00
Marvisak commented 2026-11-25 23:06:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:12:00Z.


Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because no title program fails at root-signature creation on main, and the failures it was written for (#885's 328 compute E_INVALIDARG) are the 64-lane wave refusal that #2194 names directly. The two also clash: together the message becomes "pipeline: compute root signature: root signature: ..." and this PR's bucket test fails. The code itself is correct.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176062540 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7176062540). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:12:00Z. --- Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing because no title program fails at root-signature creation on `main`, and the failures it was written for (#885's 328 compute `E_INVALIDARG`) are the 64-lane wave refusal that #2194 names directly. The two also clash: together the message becomes "pipeline: compute root signature: root signature: ..." and this PR's bucket test fails. The code itself is correct. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

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!2155
No description provided.