Keep the first partial piece in parallel shadow compares #114
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!114
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-114"
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?
@cxy0072019-sketch on GitHub · 2026-11-27 01:39 UTC · original
cxy0072019-sketch:codex/compare-first-shadow-piece→main· +30 −2 · 1 files · 1 commits · merged 2026-11-27 02:28 UTCWhen a title buffer starts inside a 64 KiB piece, the first aligned cut in
Shadow::differingcan fall below the buffer. Unsigned subtraction wraps in release mode, so the first worker can skip its entire slice and miss bytes that the GPU wrote. Saturating the alignment calculation keeps that first piece in the comparison.Adapted from victory-fork #1407, which credits the original finding to Kelvaroq.
On Windows release, the new 48 MiB regression missed the change at offset
0x0on main. With the fix, all three focused comparison tests pass. The regression uses the existing unbackedShadowtest helper and synthetic bytes, so it runs without a D3D12 adapter or title data.@TaynanGT on GitHub · 2026-11-27 01:40 UTC · original · reviewed
Thanks for carrying over the fix and keeping the test independent of a D3D12 adapter. I checked the split at
21ec8110. Clamping the first cut restoresfrom, the interior workers still meet at 64 KiB title-address boundaries, and the last worker keeps the exactto. The 48 MiB case hits the parallel path and checks changes at both ends of the range. I saw your Windows release result in the PR description. Repository CI is still running.