[pr-fix] [rendering] [shaders] Fix same-list depth publication and Wave32 backward permutes #1532

Closed
invismann wants to merge 1 commit from upstream-pr/1532 into main
invismann commented 2026-11-28 21:20:30 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by invismann on 2026-11-28T21:20:30Z.


Supersedes #1018 and #1019. This branch reapplies the original fixes on top of 77df871e as two commits.

Changes

  • Publish shader-written depth-plane twins before later draws in the same command list. Restore the render targets and invalidate the cached bindings and resource states after the internal copy.
  • Keep ds_bpermute_b32 gathers within the caller's 32-lane half and return zero for inactive source lanes. This lets independent Wave32 halves execute these gathers.
  • Include the test-only module split from #1460 so emit/lower.rs fits the asset-policy limit.

Validation

  • Built the diagnostics workspace and passed 118 targeted tests on Windows with an RTX 4090. One test remained ignored.
  • The same-list depth regression read back the expected lighting result. Disabling early publication caused the readback assertion to fail.
  • The backward-permute GPU test checked wrapped indices and inactive sources in 64- and 128-thread groups. Restoring the old lowering caused the Wave32 translation to be refused.
  • cargo xtask policy passed for all 307 files.

Strict workspace Clippy stops at the unused colour variable and the manually checked division already present in emit/lower.rs on 77df871e.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544681372 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1532). Originally posted by [invismann](https://github.com/invismann) on 2026-11-28T21:20:30Z. --- Supersedes #1018 and #1019. This branch reapplies the original fixes on top of `77df871e` as two commits. ## Changes - Publish shader-written depth-plane twins before later draws in the same command list. Restore the render targets and invalidate the cached bindings and resource states after the internal copy. - Keep `ds_bpermute_b32` gathers within the caller's 32-lane half and return zero for inactive source lanes. This lets independent Wave32 halves execute these gathers. - Include the test-only module split from #1460 so `emit/lower.rs` fits the asset-policy limit. ## Validation - Built the diagnostics workspace and passed 118 targeted tests on Windows with an RTX 4090. One test remained ignored. - The same-list depth regression read back the expected lighting result. Disabling early publication caused the readback assertion to fail. - The backward-permute GPU test checked wrapped indices and inactive sources in 64- and 128-thread groups. Restoring the old lowering caused the Wave32 translation to be refused. - `cargo xtask policy` passed for all 307 files. Strict workspace Clippy stops at the unused `colour` variable and the manually checked division already present in `emit/lower.rs` on `77df871e`.

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
trustno1-coder/VIctory-NVIDIA!1532
No description provided.