fix(gpu): keep translated shaders when cache publication fails #556
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/Belobug--VIctory-Belobug-AMD!556
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-556"
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?
@hajduzsolt on GitHub · 2026-11-27 11:22 UTC · original
hajduzsolt:fix/use-uncached-shader-translation→a-publier· +93 −42 · 1 files · 1 commits · openWhat changes
The shader cache translates on a miss, then writes and renames a staging file. If that write or rename failed, the runtime discarded the compiled result and could drop draws or dispatches even though translation succeeded.
The runtime now uses the result already in memory and warns if the cache could not store it. Successful misses also skip reading the just-written file back. Explicit shader precompilation still reports a publication failure, and a real translator error is still returned. The on-disk format and keys are the same.
This keeps rendering available when a cache write fails on an RX 9070 XT Windows setup. It does not make an unsupported shader compile.
Verification
The new regression test obstructs a cache destination with a directory. The runtime returns the synthetic shader after one translation, while precompilation reports an error. The existing round-trip, corrupted-entry and stale-cache tests also pass. Windows workspace compile, strict Clippy in both configurations, GPU tests and asset policy pass. Both workspace test runs reproduce the same HLE loopback failure and shader test process exit 0xc0000005 as the base.
AI assistance: ChatGPT 6.2 Sol Extra High.
@MamaLeVrai on GitHub · 2026-11-27 15:56 UTC · original
Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At
02868ad:victory-gpu396 passed, 1 failed, 34 ignored. The failure,watch::tests::a_write_opens_the_view_it_goes_through, is the knownwatchflake (#450). The PR doesn't touchwatch.rs; the module passed 10 of 10 on re-run.AI-assisted (Claude Code); no game data.
@hajduzsolt on GitHub · 2026-11-27 16:23 UTC · original
Thanks for testing
02868adand rerunning the watch suite. The first failure matches #450, and the watch suite passed in the rerun. Both results are useful for interpreting this shader-cache test.AI assistance: ChatGPT 6.2 Sol Extra High.
View 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.