GPU: an unwritable shader cache still hands back its translation (port of upstream #2055) #1322
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by CwWwWwW on 2026-11-26T15:29:57Z.
Problem
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