gpu(native): run scanner rounds over the rayon pool #612
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!612
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-608"
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?
@AnastasisKon on GitHub · 2026-11-28 12:04 UTC · original
AnastasisKon:vibe/scan-par-1705ac→main· +126 −33 · 4 files · 1 commits · openRefs #179
What
The scanner thread hashed every watched texture one after another on its single thread — a round over hundreds of watched textures was one long serial read+hash chain every 5 ms, no matter how many cores sat idle.
scan_roundnow maps the watched entries over the rayon pool. Eachscan_onesnapshots the entry's compare-state under theWatchedlock, then reads and hashes its own texture without holding the lock (each rayon thread keeps a thread-local scratch buffer, reused across rounds). Results are applied under the lock in a single pass, with the same re-check as before (skip when the entry was released or a submission began/applied meanwhile).Semantics are unchanged: identical hashes, identical
seen/partial/dirtyupdates, identical skip conditions — the existing scanner tests (scanner_forgets_removed_keys...,dirty_this_roundusers, probe-round tests) all pass unmodified.Adds
rayonas a workspace dependency ofvictory-gpu.Testing
cargo test -p victory-hle -p victory -p victory-gpu -p xtask(host arm64) — all passcargo test --target x86_64-apple-darwin -p victory-gpu --lib textures::— 18 pass, 0 failcargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— cleancargo xtask policy— 404 files okChecklist
vibe/scan-par-1705acfromupstream/main, pushed to my fork only@AnastasisKon on GitHub · 2026-11-28 12:21 UTC · original
CI green (check + macos-scripts SUCCESS), marked ready for review.
@AnastasisKon on GitHub · 2026-11-28 12:49 UTC · original
Note for review: #607, #608, #609, #612, #614 and #613 were cherry-picked together onto a local integration branch off main; host 4-crate tests, x86_64-apple-darwin tests (victory-gpu/victory-loader/victory-hle), windows-target clippy --locked -D warnings and cargo xtask policy all pass on the composed result (the scan_round hunks of #607/#605/#608 resolve to: par_iter scan_one, big textures via read_into + hash_of). Happy to rebase any of these onto another once it merges.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.