Keep runtime shader translation usable when the cache cannot be written #636

Open
cnuonr wants to merge 2 commits from upstream-pr/636 into main
cnuonr commented 2026-11-28 02:15:21 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cnuonr on 2026-11-28T02:15:21Z.


Problem

Runtime shader translation can succeed and still be reported as a failure if publishing the disk-cache entry fails. An unavailable cache then blocks rendering even though the translated shader is ready.

Change

Keep the translation result through cache publication and return it directly at runtime. A cache hit still reads and checks the stored entry. Explicit shader precompilation requires an open cache and reports publication failures. Genuine translation errors keep their original context.

Verification

cargo test --locked -p victory-gpu --lib shader_cache::tests passed all 5 tests on Windows. The regressions check runtime success after publication fails, an explicit error when precompilation has no open cache, and preservation of a genuine translation error without a retry.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535724441 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/636). Originally posted by [cnuonr](https://github.com/cnuonr) on 2026-11-28T02:15:21Z. --- ## Problem Runtime shader translation can succeed and still be reported as a failure if publishing the disk-cache entry fails. An unavailable cache then blocks rendering even though the translated shader is ready. ## Change Keep the translation result through cache publication and return it directly at runtime. A cache hit still reads and checks the stored entry. Explicit shader precompilation requires an open cache and reports publication failures. Genuine translation errors keep their original context. ## Verification `cargo test --locked -p victory-gpu --lib shader_cache::tests` passed all 5 tests on Windows. The regressions check runtime success after publication fails, an explicit error when precompilation has no open cache, and preservation of a genuine translation error without a retry.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/636:upstream-pr/636'
git switch 'upstream-pr/636'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/636'
git switch 'upstream-pr/636'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/636'
git switch 'upstream-pr/636'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/636'
git switch 'main'
git merge --squash 'upstream-pr/636'
git switch 'main'
git merge --ff-only 'upstream-pr/636'
git switch 'main'
git merge 'upstream-pr/636'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!636
No description provided.