Preserve mesh output interpolation from native PSV0 #858

Closed
github-bot wants to merge 1 commit from gh-pr/858/head into gh-pr/858/base
Owner

@⁠Kamiloj9 on GitHub · 2026-11-25 10:55 UTC · original
Kamiloj9:codex/preserve-native-mesh-interpolation → main · +169 −0 · 2 files · 1 commits · closed without merging

Change

Read mesh vertex-output interpolation modes from the original shader's PSV0. Match its records to the OSG1 entries by semantic name and index, row, column, width, and original component type. Apply the result only when the allocated generic float entries match unambiguously and the resulting modes agree within each affected packed row.

The previous type-based default declared a flat float beside a flat integer as linear. For two captured mesh programs, the original metadata and the linked pixel shader agree on the flat mode.

Verification

  • Synthetic test covers semantic matching across different record orders, truncated metadata, an unmatched semantic index, and a conflict in the resulting row.
  • Both affected mesh modules and their paired pixel module pass the CPU DXIL validator on this PR branch.
  • In the integration checkout, 615 of 617 captured mesh modules validate, up from 613. Every previously valid module still passes. The two remaining failures exceed the 32 KiB mesh output limit.
  • The disassembled instruction bodies of the two affected modules are identical before and after the change. The matched pixel DXIL is byte-for-byte identical.
  • Independent review and the asset policy passed. Verification was offline. Game captures and generated shader artifacts remain local.
**@⁠Kamiloj9** on GitHub · 2026-11-25 10:55 UTC · [original](https://github.com/fxceless/victory-fork/pull/858) `Kamiloj9:codex/preserve-native-mesh-interpolation` → `main` · +169 −0 · 2 files · 1 commits · closed without merging ## Change Read mesh vertex-output interpolation modes from the original shader's PSV0. Match its records to the OSG1 entries by semantic name and index, row, column, width, and original component type. Apply the result only when the allocated generic float entries match unambiguously and the resulting modes agree within each affected packed row. The previous type-based default declared a flat float beside a flat integer as linear. For two captured mesh programs, the original metadata and the linked pixel shader agree on the flat mode. ## Verification - Synthetic test covers semantic matching across different record orders, truncated metadata, an unmatched semantic index, and a conflict in the resulting row. - Both affected mesh modules and their paired pixel module pass the CPU DXIL validator on this PR branch. - In the integration checkout, 615 of 617 captured mesh modules validate, up from 613. Every previously valid module still passes. The two remaining failures exceed the 32 KiB mesh output limit. - The disassembled instruction bodies of the two affected modules are identical before and after the change. The matched pixel DXIL is byte-for-byte identical. - Independent review and the asset policy passed. Verification was offline. Game captures and generated shader artifacts remain local.
(cherry picked from commit 5c0073ce5ffc8d753d69390b9aa425a8941dbfd5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:42 +00:00
github-bot closed this pull request 2026-11-26 03:52:42 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 11:10 UTC · original

I independently checked the exact base f85101b and head 9b57cb8 with 11 original synthetic mesh metadata cases. In two different PSV0 record orders, the emitted float beside a flat integer changed from mode 2 to mode 1, and a separate float declared as sample interpolation changed from mode 2 to mode 7. The integer and linear float controls kept their modes.

Eight fallback cases emitted byte-identical DXIL containers to base, including duplicate matches, a wrong semantic name or index, a packed-row conflict, and a truncated signature record. Truncation confined to the trailing input/output dependency masks preserved the recovered modes, since those masks are outside the signature tables used here.

The untouched Linux shader suites passed with 171 tests at base and 172 at head, with two ignored each. Windows MSVC cross-target cargo check --tests passed at head. This cycle checked emitted metadata and compilation. It used no game files and did not run Microsoft DXIL validation, Windows execution, or GPU readback.

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 11:10 UTC · [original](https://github.com/fxceless/victory-fork/pull/858#issuecomment-7160687554) I independently checked the exact base `f85101b` and head `9b57cb8` with 11 original synthetic mesh metadata cases. In two different PSV0 record orders, the emitted float beside a flat integer changed from mode 2 to mode 1, and a separate float declared as sample interpolation changed from mode 2 to mode 7. The integer and linear float controls kept their modes. Eight fallback cases emitted byte-identical DXIL containers to base, including duplicate matches, a wrong semantic name or index, a packed-row conflict, and a truncated signature record. Truncation confined to the trailing input/output dependency masks preserved the recovered modes, since those masks are outside the signature tables used here. The untouched Linux shader suites passed with 171 tests at base and 172 at head, with two ignored each. Windows MSVC cross-target `cargo check --tests` passed at head. This cycle checked emitted metadata and compilation. It used no game files and did not run Microsoft DXIL validation, Windows execution, or GPU readback. AI-assisted using Codex.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original

Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head 9b57cb8 into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins, depth_written, a sort; PR #841 fixes them), also with --all-features; this PR adds none. cargo test --workspace --locked: run 1: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)); run 2: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)) (main alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 12:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/858#issuecomment-7162307844) Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `9b57cb8` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with exactly the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort; PR #841 fixes them), also with `--all-features`; this PR adds none. `cargo test --workspace --locked`: run 1: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)); run 2: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)) (`main` alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.