Shader cache: a staging file a killed process left behind no longer loses the translation #1321
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!1321
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1321"
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:02 UTC · original
CwWwWwW:fix/shader-cache-stale-temp→main· +58 −7 · 1 files · 1 commits · merged 2026-11-26 18:05 UTCProblem
victory_pipeline::cachestages a conversion in a file named by<pid>-<counter>and publishes it with a rename. This layer's host can end a run at any point (host_gpu_failedcallsTerminateProcess), and Windows reuses process ids: a later process with the same id starts its counter at 0 and meets the old file.create_newthen fails, andCache::get_or_convertreturns that error beforeshader_cache's two-attempt repair loop (crates/victory-gpu/src/shader_cache.rspropagates with?), so that shader never translates for the run: its host pipeline is never made and its draws are dropped until the cache directory is cleaned.Change
Treat an existing staging file as what it is - the leftover of a killed writer, which is the only process that could read it: open it with
truncateinstead of failing oncreate_new, then write and rename as before. The naming scheme and the published file are unchanged.Tests
cargo test -p victory-pipeline --locked: 5 passed, 0 failed.a_stale_staging_file_does_not_fail_a_conversionwrites the half-finished file a killed process would leave at the next staging name; without the change it fails (create_new: os error 80, file exists), with it the conversion is written and renamed into place.cargo clippy -p victory-pipeline --all-targets --locked -- -D warnings: clean.get_or_convertdirectly.checkjob onmainat the time of writing is already failing on the repository's asset-policy test (crates/victory-shader/src/emit/lower.rsis 526,968 bytes against the 524,288-byte limit), unrelated to this branch.@CwWwWwW on GitHub · 2026-11-26 15:09 UTC · original
CI note: the failing
checkis the pre-existing asset-policy violation oncrates/victory-shader/src/emit/lower.rs(526,968 B against the 524,288-byte limit) onmain, not this branch. #1322 from the same fork moves that file's tests under the limit; once it lands this can be rebased and the check should be green.Local on this branch:
cargo test -p victory-pipeline --locked5 passed / 0 failed; the new test fails without the change (create_new: os error 80, file exists);cargo clippy -p victory-pipeline --all-targets --locked -- -D warningsclean.