gpu: opt-in trim of mapped driver shader-cache pages (review fixes) #159
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/ReTerryDavis--ReVIctory!159
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-158"
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?
@SovietBearz0r on GitHub · 2026-12-05 18:27 UTC · original
SovietBearz0r:minivi-drivercache-trim→main· +948 −1 · 6 files · 1 commits · openReplaces the closed #112 with the review fixed: strictly opt-in, every step revalidated immediately before
VirtualUnlock, a conservative driver-cache allow-list + vendor gate, and aVirtualLockguard.Maintainer points addressed
VICTORY_DRIVER_TRIM=1arms it (unset/0/other off), documented in README as opt-in; the launcher does not set it.mapping_now()re-runsVirtualQuery+K32GetMappedFileNameW; the purechunk_still_ours()requires same allocation base/region base+size,MEM_COMMIT/MEM_MAPPED, step inside the region, and the same normalized driver-cache path/vendor — any mismatch or query failure skips the step and stops the pass. No lock is held across the 1 ms sleeps.…\DXCache\…, AMD…\DxCache\…/…\AmdDx…, Intel…\ShaderCache\…) and host-vendor match via a non-creatinghost::adapter_identity()(PCI id, name fallback). Anything else = no-op + one log line. No files edited.VirtualLock: aK32QueryWorkingSetExprobe skips any step containing aLockedpage (query failure aborts the step).quiet_ms()gating and the 30 s back-off kept;pipeline/library.rsre-arms its mapped-file trim on pipeline creations (needed for the quiet signal).Verification
cargo test -p victory-gpu --lib: 728 passed, 0 failed, 21 ignored — 12 drivercache tests (off-unless-1, allow-list/vendor, filtering/chunking/quiet floor, revalidation predicate for unchanged/unmapped/private/other-path/moved/resized/other-view/out-of-region, real private allocation refusal, real non-vendor file-mapping refusal, vendor-by-name fallback);cargo check -p victory; policy 443 files; clippy-D warnings(default + all-features) clean.VirtualUnlockon driver-owned pages remains undocumented-but-real Windows behaviour; the residual query→call race cannot be fully eliminated from user mode — hence opt-in only.Supersedes #112 (closed); branch force-pushed
c84a7ea4.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.