gpu(native): scanner hands its reads to submissions; adaptive sync threads #595
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T11:06:39Z.
What 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.