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

Closed
github-bot wants to merge 1 commit from gh-pr/2157/head into gh-pr/2157/base
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 06:29 UTC · original
fuzeofficlal:fix/cli-translate-pipeline-stage-reasons-885 → main · +129 −3 · 2 files · 1 commits · closed without merging

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

**@⁠fuzeofficlal** on GitHub · 2026-11-25 06:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/2157) `fuzeofficlal:fix/cli-translate-pipeline-stage-reasons-885` → `main` · +129 −3 · 2 files · 1 commits · closed without merging ### 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
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:56:37 +00:00
github-bot closed this pull request 2026-11-26 04:56:37 +00:00
Author
Owner

@⁠Dathinel on GitHub · 2026-11-25 06:38 UTC · original

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.

**@⁠Dathinel** on GitHub · 2026-11-25 06:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7154998478) 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.
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 08:09 UTC · original

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).

**@⁠sinan-cmyk** on GitHub · 2026-11-25 08:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7156674391) ### 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).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 11:24 UTC · original · edited 2026-11-25 12:32 UTC

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

**@⁠Marvisak** on GitHub · 2026-11-25 11:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7161007601) · edited 2026-11-25 12:32 UTC <!-- 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)_
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 12:00 UTC · original

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.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 12:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7161794328) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:12 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 22:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/2157#issuecomment-7176062540) 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

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