Shaders: one interpolation mode per pixel input row #722
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/722"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-25T05:42:44Z.
DXIL gives every element packed into a signature row one interpolation mode, and the validator refuses a pixel program whose row mixes two:
The console's compiler packs pixel inputs by register alone, since its shader code does the interpolation itself. So a row can hold a flat element beside an interpolated one, or an element nothing reads, left at its default mode, beside one that is read another way.
Change
shader::harmonize_input_rows(pixel programs, inShader::finish): an element no code reads takes the mode of the row's read elements. An integer element is only ever made constant. In a row nothing reads, a row that holds an integer becomes constant.Lower::mixed_row: a row read in two modes, or interpolated beside a flat read or an integer element, is declared constant, and its interpolations weigh the vertices withSV_Barycentrics. That is the existing path for rows read per vertex (Lower::per_vertex). Rows that use a single mode are untouched.VICTORY_FIX_HARMONIZE=0andVICTORY_FIX_MIXED=0turn the two parts off, for comparisons.Measurements
victory translate --validateover the retail shader pack withVICTORY_HOST_WAVE=32on310c6eb, using the same binary with the change off and on:Three programs move from the mixed-mode error to the existing "Program Input Signature does not match" error, so they still fail validation. The remaining 45 were not looked into individually.
Testing
emit::shader::row_tests).cargo test -p victory-shadergives 218 passed, 0 failed.310c6eb.AI-assisted (Claude Code, Claude Opus 5.5). Counts only; no game data attached.
🤖 Generated with Claude Code
Imported from fxceless/victory-fork. Originally posted by JRamos1993 on 2026-11-25T05:54:51Z.
Offline check on the retail shader pack: +22 programs validate and nothing is lost, but #699 validates the same 22 plus 120 more.
Setup: RTX 5090, Windows 11.
victory translate --validate --listover the title's full shader pack,main310c6ebagainst this head merged onto it. I added a local DXIL hash on each validated line.So on this pack, #699 alone does what this does and more. Details: https://github.com/fxceless/victory-fork/pull/699
AI use: Claude Code with Claude Opus 5.5 ran the pack and wrote this. Nothing from the title is in it.
Imported from fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-25T06:13:18Z.
Thanks @JRamos1993, confirmed on my side too, so I'm closing this in favour of #699 by @Praisser.
On
310c6eb+ #699, I measured the one part of this PR that #699 leaves out on purpose:Lower::mixed_row, which makes a row whose read elements disagree constant and interpolates it by hand. I used the same binary with it off and on,victory translate --validateover the retail pack withVICTORY_HOST_WAVE=32:#699 leaves no mixed-mode rows on this pack, so
mixed_rowhas nothing left to fix, and #699 covers everything this PR did plus the element order and the vertex/mesh outputs.AI-assisted (Claude Code, Claude Opus 5.5).
Pull request closed