Repository navigation
UP-1: retain translated shaders across cache misses and write failures - #51
Merged
ShinniUwU merged 5 commits intoNov 26, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
UP-1: adapts upstream VIctory bca3ecd. A successful shader translation is now returned directly on a cache miss, even when writing or publishing its entry fails. Previously that I/O error discarded a usable shader and could leave its pipelines' draws dropped for the rest of the run.
This removes the immediate reread/decode on misses and warns once with the failing cache destination. Actual translation errors still propagate, and cached entries still undergo decoding and corrupt-entry recovery. The existing source fingerprint invalidates older entries once, so warm the cache again before gameplay comparisons. UP-1 remains open for other upstream work.
How it was tested
Checks run on this branch:
cargo test --workspace --locked: 655 passed, 0 failed, 18 ignoredcargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policyFive shader-cache tests pass in release default and diagnostics builds, on native Windows and Proton 11 / Wine 11.0. The tests cover full shader metadata, disk hits, corrupt-entry recovery, failed translations, an unusable cache folder, publication collision and staging-file cleanup. The pinned
a141614baseline with only the new tests reproduces precisely the two recovery failures; its other three controls pass.PR Windows CI passes both Clippy configurations and the complete workspace suite.
Dedicated Windows validation also runs all-target workspace checking/testing and doctests. Its source matches PR head
ae91ac9d89a6789745a8b335b7eb35468b59a66e, with only the fork validation workflow added. Both release test inventories and the expected baseline failures are explicitly checked to prevent empty or skipped suites from passing.Measured the complete production
cached()calls before/after with a synthetic clone callback on an i9-14900KS, Pop!_OS 22.04/ext4, Rust 1.98.1 Windows release, offline Steam Flatpak Proton 11 / Wine 11.0. RTX 5090 / NVIDIA 580.173.02 is present but unused. Twelve paired rounds × 128 lookups per sample alternate implementation order; all 144 samples and 18,432 timed lookups are retained. Every returned field, persisted byte and hit/miss/translation count is verified.Warm-hit paired median changes are -1.0%, -1.7%, +1.1%; no warm-hit improvement is claimed. Two 8 KiB miss pairs were slower after the change; every 64/256 KiB pair improved. These are absent application-cache entries with ordinary OS caching, not forced physical cold-disk reads. Timing excludes actual translation, setup, output verification, destruction and the caller's build fingerprint. Fork notes record the exact revisions, method and full ranges.
AI