Shaders: signature rows keep the console's order and one interpolation mode #699

Open
Praisser wants to merge 1 commit from upstream-pr/699 into main
Praisser commented 2026-11-25 04:54:18 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Praisser on 2026-11-25T04:54:18Z.


Two fixes to the ISG1/OSG1/PSG1 parts that make 142 more of the title's programs pass the DXIL validator.

Measured

victory translate --validate over all 26,148 programs, on main (310c6eb) against this branch, VICTORY_HOST_MAX_WAVE=32:

validated main this branch
vertex and pixel 14,065 14,173
mesh 8,657 8,691
compute 2,722 2,722

Changes

  • Element order. signature() sorted elements by (row, column). The validator rebuilds the parts from the metadata in element order and compares the bytes, so a program that lists elements out of register order (for example TEXCOORD16 before TANGENT0 in row 10) was refused. Elements now keep their order; the only reordering left puts unplaced elements (no row) last.
  • One interpolation mode per row (container::unify_row_modes, called at the start of Shader::finish). The validator refuses a row whose elements have different modes. A row takes the mode of the elements the program reads. When none of them is read, or on an output row that has a constant member, the row is constant. A row whose read elements disagree is left alone.
  • Tests: four unit tests for the above, plus a pixel test for a 16-bit write over an f16 first half (PS_DeferredTextured_c5fd36bb). The first-half change already on main passes that test.

cargo test -p victory-shader: 219 passed, 3 ignored (RTX 3070 Laptop and WARP). Clippy is clean for the crate.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:6597500698 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/699). Originally posted by [Praisser](https://github.com/Praisser) on 2026-11-25T04:54:18Z. --- Two fixes to the ISG1/OSG1/PSG1 parts that make 142 more of the title's programs pass the DXIL validator. ## Measured `victory translate --validate` over all 26,148 programs, on main (310c6eb) against this branch, `VICTORY_HOST_MAX_WAVE=32`: | validated | main | this branch | |---|---|---| | vertex and pixel | 14,065 | **14,173** | | mesh | 8,657 | **8,691** | | compute | 2,722 | 2,722 | ## Changes - **Element order.** `signature()` sorted elements by (row, column). The validator rebuilds the parts from the metadata in element order and compares the bytes, so a program that lists elements out of register order (for example TEXCOORD16 before TANGENT0 in row 10) was refused. Elements now keep their order; the only reordering left puts unplaced elements (no row) last. - **One interpolation mode per row** (`container::unify_row_modes`, called at the start of `Shader::finish`). The validator refuses a row whose elements have different modes. A row takes the mode of the elements the program reads. When none of them is read, or on an output row that has a constant member, the row is constant. A row whose read elements disagree is left alone. - Tests: four unit tests for the above, plus a pixel test for a 16-bit write over an f16 first half (PS_DeferredTextured_c5fd36bb). The first-half change already on main passes that test. `cargo test -p victory-shader`: 219 passed, 3 ignored (RTX 3070 Laptop and WARP). Clippy is clean for the crate. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot commented 2026-11-25 05:08:56 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T04:54:30Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:fxceless/victory-fork:review:6052049259 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/699#pullrequestreview-6052049259). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-25T04:54:30Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
JRamos1993 commented 2026-11-25 06:06:41 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by JRamos1993 on 2026-11-25T05:54:50Z.


Offline check on the retail shader pack: your +142 reproduces exactly here, with nothing lost. It also covers all 22 programs of #722.

Setup: RTX 5090, Windows 11. victory translate --validate --list over the title's full shader pack, main 310c6eb against this head merged onto it, default settings (no VICTORY_HOST_MAX_WAVE). I added a local DXIL hash on each validated line.

main this PR #722
validated 25,382 25,524 25,404
newly validated 142 (39 Vs, 69 Ps, 34 Ms) 22 (Ps)
lost 0 0
DXIL changed among programs validating on both 0 0
  • #722's 22 are a subset of these 142.
  • The 142 are exactly main's signature mismatches (72) and interpolation-mode failures (70), the two classes of #53 and #150. So this PR alone covers what the earlier signature PRs (#189, #124, #112, #110) and #150 fix on this pack.

AI use: Claude Code with Claude Opus 5.5 ran the pack and wrote this. Nothing from the title is in it.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7154258676 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/699#issuecomment-7154258676). Originally posted by [JRamos1993](https://github.com/JRamos1993) on 2026-11-25T05:54:50Z. --- **Offline check on the retail shader pack: your +142 reproduces exactly here, with nothing lost. It also covers all 22 programs of #722.** **Setup:** RTX 5090, Windows 11. `victory translate --validate --list` over the title's full shader pack, `main` `310c6eb` against this head merged onto it, default settings (no `VICTORY_HOST_MAX_WAVE`). I added a local DXIL hash on each validated line. | | `main` | this PR | #722 | |---|---|---|---| | validated | 25,382 | **25,524** | 25,404 | | newly validated | | 142 (39 Vs, 69 Ps, 34 Ms) | 22 (Ps) | | lost | | 0 | 0 | | DXIL changed among programs validating on both | | 0 | 0 | - **#722's 22 are a subset of these 142.** - **The 142 are exactly `main`'s signature mismatches (72) and interpolation-mode failures (70)**, the two classes of #53 and #150. So this PR alone covers what the earlier signature PRs (#189, #124, #112, #110) and #150 fix on this pack. AI use: Claude Code with Claude Opus 5.5 ran the pack and wrote this. Nothing from the title is in it.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/699:upstream-pr/699'
git switch 'upstream-pr/699'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/699'
git switch 'upstream-pr/699'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/699'
git switch 'upstream-pr/699'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/699'
git switch 'main'
git merge --squash 'upstream-pr/699'
git switch 'main'
git merge --ff-only 'upstream-pr/699'
git switch 'main'
git merge 'upstream-pr/699'
git push origin 'main'
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
fxceless/victory-fork!699
No description provided.