fix(shaders): fix wave32 reductions, divergent quad ops, ScreenProbes barriers, decal NaNs, and tile RMW races #521

Open
github-bot wants to merge 1 commit from github-bot/gh-521 into main AGit
Owner

@⁠ZerefDragnee1l on GitHub · 2026-12-06 01:49 UTC · original
ZerefDragnee1l:fix/replacement-shaders-wave32-barriers-and-rmw → main · +362 −253 · 14 files · 1 commits · open

Splits the replacement compute shader correctness fixes out of #408 onto current main.

Summary

  • 07c93bfb77fecebb: Add Wave32 cross-wave groupshared reductions for 8x8 tile ballots and min/max/sum, guard single-lane tile UAV writes, and remove redundant barriers.
  • 2561af9577c47289: Hoist QuadReadLaneAt calls under uniform control flow via finite-checked quad_uv_grad.
  • ScreenProbes (0f9382de, ca91c139, d5f6125b, f76abe01): Replace early returns before GroupMemoryBarrierWithGroupSync with sentinel/exited flags so all active lanes hit trailing barriers cleanly.
  • Decals & tiles (e4a9f58e, c4183d3c, b9688048, 1f1fbd86): Clamp chained sqrt() inputs, guard 1-based object index underflow, and replace O(N^2) LDS scans with wave intrinsics.
  • Shadow & tile RMW (559d9f01, 002e93a6, 0e64f14f, 191ecaed): Guard +inf depth neighbor NaNs in 559d9f01 and serialize per-tile UAV read-modify-write races.

Verification

  • git diff --check -> clean
  • cargo check -p larp -> exited 0 (apps/larp/build.rs DXC compilation across 1M and 2M heaps succeeded cleanly).
**@⁠ZerefDragnee1l** on GitHub · 2026-12-06 01:49 UTC · [original](https://github.com/gamingwithhomie/larp/pull/521) `ZerefDragnee1l:fix/replacement-shaders-wave32-barriers-and-rmw` → `main` · +362 −253 · 14 files · 1 commits · open Splits the replacement compute shader correctness fixes out of #408 onto current `main`. ### Summary - **`07c93bfb77fecebb`**: Add Wave32 cross-wave `groupshared` reductions for 8x8 tile ballots and min/max/sum, guard single-lane tile UAV writes, and remove redundant barriers. - **`2561af9577c47289`**: Hoist `QuadReadLaneAt` calls under uniform control flow via finite-checked `quad_uv_grad`. - **ScreenProbes (`0f9382de`, `ca91c139`, `d5f6125b`, `f76abe01`)**: Replace early returns before `GroupMemoryBarrierWithGroupSync` with sentinel/exited flags so all active lanes hit trailing barriers cleanly. - **Decals & tiles (`e4a9f58e`, `c4183d3c`, `b9688048`, `1f1fbd86`)**: Clamp chained `sqrt()` inputs, guard 1-based object index underflow, and replace `O(N^2)` LDS scans with wave intrinsics. - **Shadow & tile RMW (`559d9f01`, `002e93a6`, `0e64f14f`, `191ecaed`)**: Guard `+inf` depth neighbor NaNs in `559d9f01` and serialize per-tile UAV read-modify-write races. ### Verification - `git diff --check` -> clean - `cargo check -p larp` -> exited 0 (`apps/larp/build.rs` DXC compilation across 1M and 2M heaps succeeded cleanly).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 01:54:11 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/521/head:github-bot/gh-521'
git switch 'github-bot/gh-521'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-521'
git switch 'github-bot/gh-521'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-521'
git switch 'github-bot/gh-521'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-521'
git switch 'main'
git merge --squash 'github-bot/gh-521'
git switch 'main'
git merge --ff-only 'github-bot/gh-521'
git switch 'main'
git merge 'github-bot/gh-521'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.