Shaders: link oversized mesh exports to live pixel inputs #1457

Merged
Mikey970 merged 2 commits from upstream-pr/1457 into main 2026-11-29 00:24:47 +00:00
Mikey970 commented 2026-11-28 20:18:46 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Mikey970 on 2026-11-28T20:18:46Z.


Some translated mesh shaders declare more than D3D12's 32 KiB mesh-output limit even after reducing their vertex and primitive maxima. A given material's pixel stage often reads only part of those exports.

Opt in with VICTORY_MESH_LINK=1. Link oversized mesh outputs to the paired pixel shader's live inputs, keep system values and the original root bindings, and key the linked mesh variant by the paired pixel bytecode. Depth-only draws can drop unconsumed generic exports. The existing VICTORY_PAIRS translation diagnostic can validate and create the linked pipelines. Leave VICTORY_MESH_OUTPUT_STRICT unset for this experiment so lowering can emit the template.

On our integration branch, the original implementation passed DXIL validation and created hardware pipelines for all 71 oversized mesh shaders paired with pixel programs from the archive. This upstream adaptation passed Rust syntax parsing and diff checks. Compilation and hardware validation against current main are pending.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544203418 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1457). Originally posted by [Mikey970](https://github.com/Mikey970) on 2026-11-28T20:18:46Z. --- Some translated mesh shaders declare more than D3D12's 32 KiB mesh-output limit even after reducing their vertex and primitive maxima. A given material's pixel stage often reads only part of those exports. Opt in with `VICTORY_MESH_LINK=1`. Link oversized mesh outputs to the paired pixel shader's live inputs, keep system values and the original root bindings, and key the linked mesh variant by the paired pixel bytecode. Depth-only draws can drop unconsumed generic exports. The existing `VICTORY_PAIRS` translation diagnostic can validate and create the linked pipelines. Leave `VICTORY_MESH_OUTPUT_STRICT` unset for this experiment so lowering can emit the template. On our integration branch, the original implementation passed DXIL validation and created hardware pipelines for all 71 oversized mesh shaders paired with pixel programs from the archive. This upstream adaptation passed Rust syntax parsing and diff checks. Compilation and hardware validation against current main are pending.
nick0451 commented 2026-11-28 21:44:27 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-28T21:44:27Z.


A smoke test in play: RTX 3090 24 GB (driver 610.88), i9-14900K, Windows 11. A release build of this PR merged onto main 923e38c, run in turn with main and three other PR builds. Series S, DLSS Performance, frame generation off. The same frozen save, outdoors on a balcony, standing still. Two rounds, each run 40 s to settle and 60 s measured, then a screenshot.

  • No crash, device loss or ERROR line. The picture matches main (the same view; only the idle pose differs). The shaders that do not translate are the same 10 as main.
  • With VICTORY_MESH_LINK=1 the log shows no mesh-link line in this scene, so no oversized mesh shader seems to be created here. This confirms the switch does no harm when it has nothing to link; it does not test the linking itself.
  • fps in round 2: 23.8 against main 23.0-23.5. Round 1 (18.5) was slow for every new build in the session, a first-start cost.

Tested with an AI assistant (Claude Code); results are from this PC.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7246237158 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1457#issuecomment-7246237158). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-28T21:44:27Z. --- A smoke test in play: RTX 3090 24 GB (driver 610.88), i9-14900K, Windows 11. A release build of this PR merged onto main `923e38c`, run in turn with main and three other PR builds. Series S, DLSS Performance, frame generation off. The same frozen save, outdoors on a balcony, standing still. Two rounds, each run 40 s to settle and 60 s measured, then a screenshot. - No crash, device loss or `ERROR` line. The picture matches main (the same view; only the idle pose differs). The shaders that do not translate are the same 10 as main. - With `VICTORY_MESH_LINK=1` the log shows no mesh-link line in this scene, so no oversized mesh shader seems to be created here. This confirms the switch does no harm when it has nothing to link; it does not test the linking itself. - fps in round 2: 23.8 against main 23.0-23.5. Round 1 (18.5) was slow for every new build in the session, a first-start cost. Tested with an AI assistant (Claude Code); results are from this PC.
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
trustno1-coder/VIctory-NVIDIA!1457
No description provided.