Add an opt-in Wave32 path for the water portal compute shader #949

Merged
nawnie merged 5 commits from upstream-pr/949 into main 2026-11-28 19:39:38 +00:00
nawnie commented 2026-11-28 09:42:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nawnie on 2026-11-28T09:42:14Z.


Summary

Add VICTORY_WATER_VOLUME_PORTALS=1 for Wave32 lowering of CS_TransmissionVolumetrics_VolumePortalsOnly. The path checks the exact compute shader digest and 64-thread group size, runs only when host-form emission needs a Wave32 fallback, and contributes the opt-in value to the shader-cache fingerprint. An explicit VICTORY_WAVE_WIDE setting takes precedence.

The broader work in #326 also enables this shader. This draft proposes the portal shader on its own so it can be reviewed and tested independently.

Verification

  • Built this branch on Windows with cargo build --offline --locked -p victory --release -j 4. cargo xtask policy passed for all 294 tracked files.
  • On an RTX 4070 Ti SUPER, the exact shader refused Wave32 lowering with the opt-in off. With the opt-in on, one compute shader emitted, passed Microsoft's DXIL validation, and created a native D3D12 compute pipeline.
  • In a local integration run with other opt-in shader work disabled, a full shader warmup recorded 225 then 224 translation refusals. The warmup of previously used pipelines recorded two then one refusals. The targeted a10179ab7eda0dc3 compute-pipeline warning appeared in the control gameplay log and was absent with the opt-in enabled. Both runs loaded copies of the same checkpoint and logged no device loss.
  • The checkpoint captures cover a safehouse. The water effect itself still needs a matched shoreline capture, and the two runs diverged in scene load, so the trial cannot establish a performance change.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5538840933 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/949). Originally posted by [nawnie](https://github.com/nawnie) on 2026-11-28T09:42:14Z. --- ## Summary Add `VICTORY_WATER_VOLUME_PORTALS=1` for Wave32 lowering of `CS_TransmissionVolumetrics_VolumePortalsOnly`. The path checks the exact compute shader digest and 64-thread group size, runs only when host-form emission needs a Wave32 fallback, and contributes the opt-in value to the shader-cache fingerprint. An explicit `VICTORY_WAVE_WIDE` setting takes precedence. The broader work in #326 also enables this shader. This draft proposes the portal shader on its own so it can be reviewed and tested independently. ## Verification - Built this branch on Windows with `cargo build --offline --locked -p victory --release -j 4`. `cargo xtask policy` passed for all 294 tracked files. - On an RTX 4070 Ti SUPER, the exact shader refused Wave32 lowering with the opt-in off. With the opt-in on, one compute shader emitted, passed Microsoft's DXIL validation, and created a native D3D12 compute pipeline. - In a local integration run with other opt-in shader work disabled, a full shader warmup recorded 225 then 224 translation refusals. The warmup of previously used pipelines recorded two then one refusals. The targeted `a10179ab7eda0dc3` compute-pipeline warning appeared in the control gameplay log and was absent with the opt-in enabled. Both runs loaded copies of the same checkpoint and logged no device loss. - The checkpoint captures cover a safehouse. The water effect itself still needs a matched shoreline capture, and the two runs diverged in scene load, so the trial cannot establish a performance change.
tippythetaidum commented 2026-11-28 18:34:44 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tippythetaidum on 2026-11-28T18:34:44Z.


A control observation that may be the scene this needs: underwater, during the dive in the "Bachelor Party" mission. RTX 5080 + Ryzen 7 9800X3D, 9300875 plus #393, #1014, #1197, #1264 and #1271, Series X 2560x1440, DLSS Performance, frame generation 4x, without this PR. a10179ab7eda0dc3 is refused at every start ("no wave32 lowering for this wave64 program"), as is 6b82bc7d22016cb5.

  • On the surface on the boat: picture fine, 130 to 370 draws a frame dropped "without a host pipeline", none being made.
  • Right after going under, much of the picture was solid black in blocks: a staircase of square tiles over the water volume, divers and fish visible through the rest. That frame's line had 706 draws dropped (the lines around it 180 to 520).
  • Deeper in the trench, the shadowed volume beside the light shafts showed a coarse dot pattern.

I can't tell yet which of the two refused programs it is. Next I'll try VICTORY_WATER_VOLUME_PORTALS=1 (with a preload) at the same point of the mission and report back.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7243897418 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/949#issuecomment-7243897418). Originally posted by [tippythetaidum](https://github.com/tippythetaidum) on 2026-11-28T18:34:44Z. --- A control observation that may be the scene this needs: underwater, during the dive in the "Bachelor Party" mission. RTX 5080 + Ryzen 7 9800X3D, `9300875` plus #393, #1014, #1197, #1264 and #1271, Series X 2560x1440, DLSS Performance, frame generation 4x, without this PR. `a10179ab7eda0dc3` is refused at every start ("no wave32 lowering for this wave64 program"), as is `6b82bc7d22016cb5`. - On the surface on the boat: picture fine, 130 to 370 draws a frame dropped "without a host pipeline", none being made. - Right after going under, much of the picture was solid black in blocks: a staircase of square tiles over the water volume, divers and fish visible through the rest. That frame's line had **706** draws dropped (the lines around it 180 to 520). - Deeper in the trench, the shadowed volume beside the light shafts showed a coarse dot pattern. I can't tell yet which of the two refused programs it is. Next I'll try `VICTORY_WATER_VOLUME_PORTALS=1` (with a preload) at the same point of the mission and report back.
tippythetaidum commented 2026-11-28 18:43:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tippythetaidum on 2026-11-28T18:43:05Z.


Correction to my note above: the blocks I described look like #739 (tile-sized blocks from the water's tiled light, which go away with VICTORY_WATER_LIGHT=0), not necessarily this program. I'll test the two separately, VICTORY_WATER_LIGHT=0 alone and then VICTORY_WATER_VOLUME_PORTALS=1 alone, at the same point of the dive, and report each.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7244002290 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/949#issuecomment-7244002290). Originally posted by [tippythetaidum](https://github.com/tippythetaidum) on 2026-11-28T18:43:05Z. --- Correction to my note above: the blocks I described look like #739 (tile-sized blocks from the water's tiled light, which go away with `VICTORY_WATER_LIGHT=0`), not necessarily this program. I'll test the two separately, `VICTORY_WATER_LIGHT=0` alone and then `VICTORY_WATER_VOLUME_PORTALS=1` alone, at the same point of the dive, and report each.
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!949
No description provided.