Separate signature rows by interpolation mode and rebuild container parts in name order #1157

Open
superboynick wants to merge 3 commits from upstream-pr/1160 into main
superboynick commented 2026-11-25 22:07:23 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by superboynick on 2026-11-25T22:07:23Z.


Three shader-emission defects, all invisible unless the census runs with --validate: every program involved already got a pipeline.

1. Signature elements of differing interpolation modes in one row (84 lines).
The emitter kept the container's row assignment and set interpolation modes per element afterwards, so two elements sharing a row could disagree. Elements are now separated by mode after lowering; a program that cannot fit within the 32 rows the format allows is reported unsupported rather than emitted invalid.

2. Container signature parts rebuilt in the wrong order (74 lines).
Both parts were rebuilt from the lowered module but ordered by column rather than by name within each register. Sorting by name matches what the module declares.

3. An array-layer index in the LOD query slot (4 lines).
An array-layer index was passed into the third coordinate of a level-of-detail query with the remaining slots left as they came, which the validator reads as an out-of-bounds coordinate rather than an unused one. Writing undef there clears the error and touches no other coordinate. Affected programs were the three *_AlphaClip pixel shaders.

Measured on the full pack (translate --validate --pipelines --list, dxil.dll 1.9, 32-lane, 26,084 programs):

origin/main this PR interpolation-mode errors 84 0 container signature mismatch 74 0 out of bound coord 4 0 validated vertex and pixel 14088 14199 pipelines created 25607 25607

All 14,199 emitted vertex and pixel programs now validate; the pipeline count is unchanged, so this corrects generated code rather than unlocking draws.

What is left on this host, untouched here: 72 mesh programs whose combined vertex and primitive outputs exceed 32768 components. Their overshoot is small - 128 to 896 components over, with 33 of 71 unique hashes at +256, all in ped-skinning meshes with no primitive outputs at all - which is documented on #854 rather than fixed.

Tests cover the row-separation rule with table-driven cases: 218 passed, 3 ignored.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6614733937 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1160). Originally posted by [superboynick](https://github.com/superboynick) on 2026-11-25T22:07:23Z. --- Three shader-emission defects, all invisible unless the census runs with `--validate`: every program involved already got a pipeline. **1. Signature elements of differing interpolation modes in one row (84 lines).** The emitter kept the container's row assignment and set interpolation modes per element afterwards, so two elements sharing a row could disagree. Elements are now separated by mode after lowering; a program that cannot fit within the 32 rows the format allows is reported unsupported rather than emitted invalid. **2. Container signature parts rebuilt in the wrong order (74 lines).** Both parts were rebuilt from the lowered module but ordered by column rather than by name within each register. Sorting by name matches what the module declares. **3. An array-layer index in the LOD query slot (4 lines).** An array-layer index was passed into the third coordinate of a level-of-detail query with the remaining slots left as they came, which the validator reads as an out-of-bounds coordinate rather than an unused one. Writing `undef` there clears the error and touches no other coordinate. Affected programs were the three `*_AlphaClip` pixel shaders. **Measured on the full pack** (`translate --validate --pipelines --list`, dxil.dll 1.9, 32-lane, 26,084 programs): ` origin/main this PR interpolation-mode errors 84 0 container signature mismatch 74 0 out of bound coord 4 0 validated vertex and pixel 14088 14199 pipelines created 25607 25607 ` All 14,199 emitted vertex and pixel programs now validate; the pipeline count is unchanged, so this corrects generated code rather than unlocking draws. What is left on this host, untouched here: 72 mesh programs whose combined vertex and primitive outputs exceed 32768 components. Their overshoot is small - 128 to 896 components over, with 33 of 71 unique hashes at +256, all in ped-skinning meshes with no primitive outputs at all - which is documented on #854 rather than fixed. Tests cover the row-separation rule with table-driven cases: 218 passed, 3 ignored.
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/1160:upstream-pr/1160'
git switch 'upstream-pr/1160'

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/1160'
git switch 'upstream-pr/1160'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1160'
git switch 'upstream-pr/1160'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1160'
git switch 'main'
git merge --squash 'upstream-pr/1160'
git switch 'main'
git merge --ff-only 'upstream-pr/1160'
git switch 'main'
git merge 'upstream-pr/1160'
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!1157
No description provided.