Shaders: interpolation modes from the console container's PSV0 #150

Closed
wildheathen wants to merge 1 commit from upstream-pr/150 into main
wildheathen commented 2026-11-24 21:54:26 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by wildheathen on 2026-11-24T21:54:26Z.


The interpolation modes of interpolated elements came from DXC's defaults by type: float linear, uint constant. But the console's compiler packs a float and a uint into one signature row and declares both constant in its PSV0. So the defaults mixed modes within one row, and dxil.dll refused the shader: "signature element … has interpolation mode that differs from another element packed into the same row". This reads the modes from the console container's PSV0, by row and column, and falls back to the defaults when there's no PSV0.

It's the interpolation part of Marvisak/VIctory#1208 by @powplusplus, kept under their authorship, with its test. The only adaptation is the geometry field this fork added to Psv. #1208's other two parts are covered here already: the PSV0 string table by #61, the ISG1/OSG1 row order by #110 / #112.

Measured

victory translate --validate --list over shaders.rpf, fork 4e17478, dxil.dll 10.0.26100:

validated "interpolation mode that differs … same row" "Program Input/Output Signature does not match"
4e17478 25,382 70 72
this PR 25,443 (+61) 3 78
#112 (or #110) 25,454 (+72) 70 0
this PR + #112 25,521 (+139) 3 0
  • Compared program by program, no program that validates on 4e17478 fails with this PR, alone or with #112. The +61 are 31 pixel, 17 mesh and 13 vertex programs.
  • It's complementary to #110 / #112: their 72 and these 61 don't overlap, and together they give +139. Six programs that pass the interpolation check with this PR alone then stop at the signature-order check, which #110 / #112 fix. That's why the third column goes up by 6 here.
  • #110 and #112 gain the same 72 programs on this dump.

Checks

  • cargo test -p victory-shader: 211 passed. console_psv_interpolation_modes_are_preserved_for_copacked_inputs (from #1208) fails on 4e17478 with mode 2, linear, where the console says 1, constant, and passes here.
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean. cargo xtask policy: ok. cargo fmt --check reports nothing in emit/mod.rs.
  • Offline only: no title run. Windows, RTX 5080. No game data or shader names included.
<!-- greyfinch-sync:fxceless/victory-fork:issue:5480971713 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/150). Originally posted by [wildheathen](https://github.com/wildheathen) on 2026-11-24T21:54:26Z. --- The interpolation modes of interpolated elements came from DXC's defaults by type: float linear, uint constant. But the console's compiler packs a float and a uint into one signature row and declares both constant in its PSV0. So the defaults mixed modes within one row, and `dxil.dll` refused the shader: "signature element … has interpolation mode that differs from another element packed into the same row". This reads the modes from the console container's PSV0, by row and column, and falls back to the defaults when there's no PSV0. It's the interpolation part of Marvisak/VIctory#1208 by @powplusplus, kept under their authorship, with its test. The only adaptation is the `geometry` field this fork added to `Psv`. #1208's other two parts are covered here already: the PSV0 string table by #61, the ISG1/OSG1 row order by #110 / #112. ## Measured `victory translate --validate --list` over `shaders.rpf`, fork `4e17478`, dxil.dll 10.0.26100: | | validated | "interpolation mode that differs … same row" | "Program Input/Output Signature does not match" | |---|---:|---:|---:| | `4e17478` | 25,382 | 70 | 72 | | **this PR** | **25,443 (+61)** | **3** | 78 | | #112 (or #110) | 25,454 (+72) | 70 | 0 | | **this PR + #112** | **25,521 (+139)** | 3 | 0 | - Compared program by program, no program that validates on `4e17478` fails with this PR, alone or with #112. The +61 are 31 pixel, 17 mesh and 13 vertex programs. - It's complementary to #110 / #112: their 72 and these 61 don't overlap, and together they give +139. Six programs that pass the interpolation check with this PR alone then stop at the signature-order check, which #110 / #112 fix. That's why the third column goes up by 6 here. - #110 and #112 gain the same 72 programs on this dump. ## Checks - `cargo test -p victory-shader`: 211 passed. `console_psv_interpolation_modes_are_preserved_for_copacked_inputs` (from #1208) **fails on `4e17478`** with mode 2, linear, where the console says 1, constant, and passes here. - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. `cargo xtask policy`: ok. `cargo fmt --check` reports nothing in `emit/mod.rs`. - Offline only: no title run. Windows, RTX 5080. No game data or shader names included.
Parakeet-Wheat commented 2026-11-25 00:10:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Parakeet-Wheat on 2026-11-24T23:14:09Z.


Reproduced the table on a second machine, and checked how this combines with #110 / #112 / #124 when merging.

  • Setup: Windows 11 26300, NVIDIA GeForce RTX 3070 (8 GB, driver 610.88), Ryzen 5 5600X, Rust 1.98.1 (x86_64-pc-windows-msvc), dxil.dll 1.8.2502, title 1.0.2.1; each PR merged onto 2119b0e.
  • victory translate <exe> shaders.rpf --list --validate, program by program against 2119b0e (25,382 validated): this PR +61, #110 / #112 / #124 +72 each, this PR + #112 +139; 0 lost in every case. #110, #112 and #124 gain the same 72 programs (0 differences between any pair).
  • cargo test -p victory-shader --locked: 211 passed, 0 failed, 2 ignored (this PR); 212 / 0 / 2 with #112.
  • Merging: this PR merges cleanly with #112. With #110 or #124 it conflicts in emit/mod.rs, where both add a test at the same spot (keep both tests).

Offline translation and validation only; no shader contents or extracted data included. AI-assisted (Claude Code); run on my machine.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7147169222 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/150#issuecomment-7147169222). Originally posted by [Parakeet-Wheat](https://github.com/Parakeet-Wheat) on 2026-11-24T23:14:09Z. --- Reproduced the table on a second machine, and checked how this combines with #110 / #112 / #124 when merging. - **Setup:** Windows 11 26300, NVIDIA GeForce RTX 3070 (8 GB, driver `610.88`), Ryzen 5 5600X, Rust 1.98.1 (`x86_64-pc-windows-msvc`), `dxil.dll` 1.8.2502, title 1.0.2.1; each PR merged onto `2119b0e`. - `victory translate <exe> shaders.rpf --list --validate`, program by program against `2119b0e` (25,382 validated): this PR **+61**, #110 / #112 / #124 **+72** each, this PR + #112 **+139**; **0 lost** in every case. #110, #112 and #124 gain the **same 72 programs** (0 differences between any pair). - `cargo test -p victory-shader --locked`: **211 passed, 0 failed, 2 ignored** (this PR); **212 / 0 / 2** with #112. - Merging: this PR merges cleanly with #112. With #110 or #124 it conflicts in `emit/mod.rs`, where both add a test at the same spot (keep both tests). *Offline translation and validation only; no shader contents or extracted data included. AI-assisted (Claude Code); run on my machine.*
wildheathen commented 2026-11-29 09:32:20 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by wildheathen on 2026-11-29T09:32:20Z.


Closing this: main now carries VIctory-NVIDIA's tree (368967f), so this branch no longer applies. The same change is proposed there in trustno1-coder/VIctory-NVIDIA#1979, which also covers mesh-shader outputs and arbitrary pixel-shader inputs. Thanks for reproducing it on the 3070.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7253829669 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/150#issuecomment-7253829669). Originally posted by [wildheathen](https://github.com/wildheathen) on 2026-11-29T09:32:20Z. --- Closing this: main now carries VIctory-NVIDIA's tree (368967f), so this branch no longer applies. The same change is proposed there in trustno1-coder/VIctory-NVIDIA#1979, which also covers mesh-shader outputs and arbitrary pixel-shader inputs. Thanks for reproducing it on the 3070.

Pull request closed

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