gpu/shadow: saturate parallel compare first cut at span start #37
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/37"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T10:58:55Z.
Summary
Port rustno1-coder/VIctory-NVIDIA 78e99b9 (from kelvaroq 009-shadow-compare.patch / xceless/victory-fork PR #1407 81d54b0):
Rig Specs Tested On
Run Settings & Profile
elease (and
elease --features diagnostics) @ $sha
Measurements & Verification
ear_black=0.0%, magenta=0.0%)
o_host_texture_errors=0)
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T11:02:57Z.
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):pendingReview Summary
Clean, tightly scoped arithmetic bug fix in
crates/victory-gpu/src/shadow.rs.main: InShadow::differing(crates/victory-gpu/src/shadow.rs:3785-3791), whenthreads >= 2(to - from >= 32 MiB), the first cut (i == 0,at == from) computes(at - (start + at) % PIECE).max(from). Wheneverfrom < (start + from) % PIECE(e.g.from == 0with an unalignedstart), this underflowsusize—panicking in debug builds or wrapping in release builds so thread 0 receivesa >= band skips its entire initial slice[from, cut(1)).scan_boundary(start, from, at)usingat.saturating_sub((start + at) % PIECE).max(from)prevents the underflow, guaranteescut(0) == from, and preservesPIECE-aligned interior cuts for1 <= i < threads(since(to - from) / threads >= 16 MiB >> PIECE).shadow::difference_tests::unaligned_parallel_scan_covers_the_first_pieceexercises aligned and unalignedstart/fromcombinations and verifies monotonic, piece-aligned cuts.Verdict
merge-candidate(pending CI completion). Pure CPU-side slice boundary arithmetic; no real-GPU smoke test is needed beyond CI.Generated with Antigravity CLI (
agy).