Shaders: PSV0 and signatures laid out as the validator expects #1208

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

@⁠powplusplus on GitHub · 2026-11-24 16:25 UTC · original
powplusplus:shader/psv-signature-validation → main · +268 −18 · 2 files · 1 commits · closed without merging

On ffe310e, dxil.dll rejects most emitted shaders with "Container part 'Pipeline State Validation' does not match expected for module" (15,054 programs in shaders.rpf), plus a few dozen signature mismatches.

  • PSV0 writes one string per arbitrary semantic element. It shared one string between elements with the same name, which is not what the validator builds.
  • ISG1 and OSG1 sort elements by row only, so elements packed into one row keep their order. #306 and #1022 change the same sort; I can drop it here if one of them lands first.
  • Interpolation modes come from the console container's PSV0 when it has one, falling back to the current defaults. That clears the "interpolation mode that differs from another element packed into the same row" errors. Related to #554, which splits such rows instead.

translate --validate over shaders.rpf, nothing else changes in what emits:

main this
VS + PS validated 2,680 / 12,231 12,231 / 12,231
CS validated 1,441 / 1,441 1,441 / 1,441
MS validated 2,573 / 8,214 8,161 / 8,214

The 53 mesh shaders left exceed the validator's 32 KB vertex plus primitive output limit.

Tested: clippy (default and all features), cargo test -p victory-shader with three new tests.

**@⁠powplusplus** on GitHub · 2026-11-24 16:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/1208) `powplusplus:shader/psv-signature-validation` → `main` · +268 −18 · 2 files · 1 commits · closed without merging On `ffe310e`, dxil.dll rejects most emitted shaders with "Container part 'Pipeline State Validation' does not match expected for module" (15,054 programs in shaders.rpf), plus a few dozen signature mismatches. - PSV0 writes one string per arbitrary semantic element. It shared one string between elements with the same name, which is not what the validator builds. - ISG1 and OSG1 sort elements by row only, so elements packed into one row keep their order. #306 and #1022 change the same sort; I can drop it here if one of them lands first. - Interpolation modes come from the console container's PSV0 when it has one, falling back to the current defaults. That clears the "interpolation mode that differs from another element packed into the same row" errors. Related to #554, which splits such rows instead. `translate --validate` over shaders.rpf, nothing else changes in what emits: | | main | this | |---|---:|---:| | VS + PS validated | 2,680 / 12,231 | 12,231 / 12,231 | | CS validated | 1,441 / 1,441 | 1,441 / 1,441 | | MS validated | 2,573 / 8,214 | 8,161 / 8,214 | The 53 mesh shaders left exceed the validator's 32 KB vertex plus primitive output limit. Tested: clippy (default and all features), `cargo test -p victory-shader` with three new tests.
- PSV0 gets one string per arbitrary semantic element instead of sharing
  one between elements with the same name.
- ISG1 and OSG1 sort elements by row only, so co-packed elements keep
  their order.
- Interpolation modes come from the console container's PSV0 when it has
  one, falling back to DXC's defaults.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:23:48 +00:00
github-bot closed this pull request 2026-11-26 04:23:48 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:00 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 084d8d2: cargo test -p victory-shader passes, 123 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1208#issuecomment-7140012081) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 084d8d2: `cargo test -p victory-shader` passes, 123 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

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

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

Superseded by main: signature rows are already sorted by register only and one interpolation mode per row is already enforced (container::same_mode_per_row), and every emitted VS/PS validates. Its remaining change, unshared PSV0 strings, departs from the layout main validates with; its test's Psv literal also lacks main's gs field.

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:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/1208#issuecomment-7148661878) Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has since replaced the code it patches. Superseded by main: signature rows are already sorted by register only and one interpolation mode per row is already enforced (container::same_mode_per_row), and every emitted VS/PS validates. Its remaining change, unshared PSV0 strings, departs from the layout main validates with; its test's Psv literal also lacks main's gs field. 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!1208
No description provided.