gpu(native): scanner hands its reads to submissions; adaptive sync threads #599
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!599
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-595"
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 11:06 UTC · original
AnastasisKon:vibe/perf-m1-1705ac→main· +231 −9 · 2 files · 1 commits · openWhat this changes
Step toward #179 (world frame rate): the texture scanner already read a changed texture's memory whole on its own thread, and the submission then read the same memory again to hash and detile it. Now the scanner keeps what it read (up to 64 MiB per texture, 512 MiB total, evicted oldest-first) in
Watch::stashed, and the submission'sJobdetiles those bytes directly (Job::stashed) — a scanner-found change is no longer read twice. Also, the sync read threads were a fixed 6;sync_threads()now uses all the host's cores but two (6 on an 8-core base M1, 10 on a 12-core M1 Pro), matching the other thread pools'available_parallelismpattern. Refs #179How it was tested
cargo test -p victory-gpu— 456 passed, 0 failed; 6 new tests: scanner stashes changed bytes+hash, cap eviction (5x1024 into a 4096 cap), per-texture cap,Job::readdetiles stashed bytes without touching memory (bogus address proves no read), unreadable stash falls back to reading, blank stash needs no detile,sync_threadssizingcargo test --target x86_64-apple-darwin -p victory-gpu --lib textures::— 25 passed under Rosettacargo test -p victory-hle -p victory -p victory-gpu -p xtask— all okcargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— RC=0cargo xtask policy— 404 files okVICTORY_TRACE_TEXTURE_SYNC=1when it lands)Checklist
VICTORY_*variable and documented — n/a, no new switchView 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.