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

Open
github-bot wants to merge 1 commit from github-bot/gh-150 into main AGit
Owner

@⁠wildheathen on GitHub · 2026-11-24 21:54 UTC · original
wildheathen:interp-from-psv0 → main · +176 −5 · 1 files · 1 commits · open

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.
**@⁠wildheathen** on GitHub · 2026-11-24 21:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/150) `wildheathen:interp-from-psv0` → `main` · +176 −5 · 1 files · 1 commits · open 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.
The modes of interpolated elements came from DXC's defaults by type
(float: linear, uint: constant), but the console's compiler may pack a
float and a uint element into one signature row, declaring both constant
in its PSV0. Mixed modes in one row are rejected by the validator
("interpolation mode that differs from another element packed into the
same row"). The modes are now read from the console container's PSV0,
keyed by row and column, falling back to the defaults without one.

Ported from Marvisak/VIctory#1208 (its interpolation-mode part and its
test), adapted to this fork's Psv (`geometry`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:36:58 +00:00
Author
Owner

@⁠Parakeet-Wheat on GitHub · 2026-11-24 23:14 UTC · original

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.

**@⁠Parakeet-Wheat** on GitHub · 2026-11-24 23:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/150#issuecomment-7147169222) 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.*
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/150/head:github-bot/gh-150'
git switch 'github-bot/gh-150'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-150'
git switch 'github-bot/gh-150'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-150'
git switch 'github-bot/gh-150'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-150'
git switch 'main'
git merge --squash 'github-bot/gh-150'
git switch 'main'
git merge --ff-only 'github-bot/gh-150'
git switch 'main'
git merge 'github-bot/gh-150'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.