Fix bitmap mark clearing in copy_back_marks #2267
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2267
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2267/head"
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?
@Kholoso on GitHub · 2026-11-25 09:24 UTC · original
Kholoso:fix-last-bitmap-sentinel→main· +1 −1 · 1 files · 1 commits · closed without merging## Problem
In
copy_back_marks, the last bitmap word is currently cleared entirely:However, the last bit is reserved as an overflow sentinel, while the preceding 31 bits may still contain valid marks.
Clearing the entire word could discard valid GPU write marks, preventing the corresponding memory from being copied back.
## Proposed fix
Clear only the overflow sentinel bit while preserving the remaining bits:
## Testing
Not tested yet. This change is based on code inspection and should be validated with a test covering valid marks in the last bitmap word.
@welisonzika14-jpg on GitHub · 2026-11-25 12:00 UTC · original
First run on NVIDIA hardware here, as far as I can see (the reviews above are static or WARP). RTX 5070 (Blackwell, driver 621.24), Ryzen 7 5700X, Windows 11, Rust 1.98.1 MSVC, no game files. Head
9ad90famerged ontomain940d32f,cargo test -p victory-gpu -p victory-shader --lib --no-fail-fast.The PR adds no test, so this only shows it breaks nothing here. The rest is the same as
mainon this card: the 5 known NVIDIA failures from #1744 (2 view heap cap tests invictory-gpu, 3 invictory-shader), nothing new.One run, unit tests only, title not run.
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@Marvisak on GitHub · 2026-11-25 12:42 UTC · original
Automated triage for the maintainers.
Proposed close: duplicate of #2269. Both PRs make the same fix in
copy_back_marks(crates/victory-gpu/src/shadow.rs): clear only the sink bit 31 of the bitmap's last dword, not the whole dword. The fix is right. #2269 also factors the drain intodrain_marksand adds a test for the last-dword case (marks_in_the_last_dword_are_read_but_the_sink_bit_is_not). Both merge cleanly. #2269 is marked as a merge candidate.This PR will be closed in 48 hours unless you push a change or a maintainer removes the
triage: proposed closelabel. Thanks for finding it.Generated by Claude Code
@Kholoso on GitHub · 2026-11-25 13:16 UTC · original
Thanks for the review! I agree that #2269 supersedes this PR. Closing this one to avoid duplicate work.
Glad the fix was useful!
Pull request closed