GPU: an unwritable shader cache still hands back its translation (port of upstream #2055) #1325
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/fxceless--victory-fork!1325
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1325"
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?
@CwWwWwW on GitHub · 2026-11-26 15:29 UTC · original
CwWwWwW:port/shader-cache-unwritable→main· +61 −8 · 1 files · 1 commits · closed without mergingProblem
A shader cache entry that cannot be written - its folder replaced by a file, the disk full, a scanner holding the file - makes
victory_pipeline::Cache::get_or_convertreturn an error after the translation has already run.shader_cache::cachedpropagated that error with?, so the translation was made once and then lost: the shader never got a host pipeline for the run, and its draws were dropped even though the work had succeeded.Upstream VIctory fixed this in commit bca3ecd (pull request #2055, by Flare); this is that fix ported and adapted to the fork.
Change
Translatekeeps theHostShaderits conversion made.encodetakes aHostShader(a refusal is not cached), so only a successful translation is kept.Tests
a_translation_is_made_once_when_its_entry_cannot_be_written: the cache root is replaced by a file, socreate_dir_allfails. Before the change this test fails withErr(... os error 183); with it the translation is returned and the converter ran exactly once.cargo test -p victory-gpu --lib --locked: 218 passed, 0 failed, 6 ignored.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.cachedand a cache folder only.(CI note: the
checkjob on main is currently red on the asset-policy violation; #1322 fixes that, after which this can be rebased.)Pull request closed