Preserve mesh output interpolation from native PSV0 #857

Closed
Kamiloj9 wants to merge 1 commit from upstream-pr/858 into main
Kamiloj9 commented 2026-11-25 10:55:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Kamiloj9 on 2026-11-25T10:55:46Z.


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.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6602872544 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/858). Originally posted by [Kamiloj9](https://github.com/Kamiloj9) on 2026-11-25T10:55:46Z. --- ## 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.
avt0m4t48 commented 2026-11-25 11:10:43 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T11:10:16Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7160687554 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/858#issuecomment-7160687554). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-25T11:10:16Z. --- 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.
MamaLeVrai commented 2026-11-25 13:06:00 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T12:23:26Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162307844 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/858#issuecomment-7162307844). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T12:23:26Z. --- 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.
upstream-sync closed this pull request 2026-11-26 01:05:58 +00:00

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