fix(gpu): a parallel compare's first cut saturates at its span's start #241
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!241
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-241"
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?
@mutlusinan on GitHub · 2026-11-27 20:03 UTC · original
mutlusinan:fix/shadow-scan-cut→main· +29 −2 · 1 files · 1 commits · closed without mergingProblem
The per-thread cut in the parallel compare was
When the compared span does not begin on a
PIECEboundary,(start + at) % PIECEcan exceedat's offset into the span, so the subtraction runs belowfromand wraps in a release build. The first thread then scans an empty (or enormous) range: differences in the first piece are never found, and those bytes are never copied back into title memory.Fix
The cut now saturates at the span's start. The new unit test walks unaligned starts (
0, 1, 31, PIECE-1), severalfromoffsets and three cuts, and asserts the cuts stay strictly ordered and (except the first and last) land on piece boundaries.Verification
cargo check -p victory-gpu --target x86_64-pc-windows-msvc --locked— clean.victory-gpuneeds Windows to build, so it was not executed here.From kelvaroq
native/patches/0009-shadow-compare.patch(GPL-3.0-or-later); the same fix as fxceless/victory-fork81d54b0(fork PR #1407).@mutlusinan on GitHub · 2026-11-27 20:21 UTC · original
Risk assessment (porting review)
from, producing an empty range for one thread; scanning an empty range is a no-op and the new test asserts the cut sequence stays strictly ordered and on piece boundaries for unaligned starts.victory-gpuonly builds on Windows, so it was not executed here.mainate69e39c.@1tsethan on GitHub · 2026-11-27 23:00 UTC · original
Independent Windows validation of PR #241.
Tested commit:
30279c13dd81686d8a8cce7d329c10098fe043bd.cargo test --locked -p victory-gpu unaligned_parallel_scan -- --nocapture --test-threads=1Exit: 0.
Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.
@cloph-dsp on GitHub · 2026-11-28 00:57 UTC · original
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
30279c13dd81686d8a8cce7d329c10098fe043bd, merge base0cef07e9d766df48f0e95f13ce3bbbe2290fe9d3.cargo test --locked -p victory-gpu --lib shadow::difference_tests::unaligned_parallel_scan_covers_the_first_piece -- --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 455 filtered, exit 0.git grep -Ffor the test name on the merge base returned no hits (test is new on this PR);git diff --check 0cef07e9 HEADclean (1 file, +29/-2).CARGO_TARGET_DIRwithCARGO_BUILD_JOBS=2.AI-assisted (Hy4 flash).
@trustno1-coder on GitHub · 2026-11-28 02:49 UTC · original
Merged into main (
8fc2254) and shipped in v2026.11.27.10. The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!Pull request closed