Shader cache: translator key skips comments, tests and unrelated lock entries; prune unused entries #1581
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1581"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-28T21:56:40Z.
The shader cache key held a fingerprint of the whole translator source and the whole Cargo.lock. An edit to a comment, a test, or an unrelated crate's lock entry changed the key, and the next start translated every shader again.
victory-gpu/build.rs: the fingerprint skips comments, blank lines, and test modules, and takes only the Cargo.lock packages the translator is built from.shader_cache.rs: entries carry aFORMATnumber. That file is outside the fingerprint, so a change toencodeordecoderaises it.victory-pipeline/src/cache.rs: withVICTORY_SHADER_CACHE_DAYS=n, entries not used forndays are removed on a thread of their own. A hit marks its entry used, and nothing goes until the cache has tracked use forndays. One folder here held 77,082 entries (2.7 GB) from earlier translator changes.<path>/<folder>/<file>, without the user's folders above it.