Offline shader commands count failed cache writes as cached #185
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/TaynanGT--Vice-Tay#185
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@NotADonky43 on GitHub · 2026-11-27 06:57 UTC · original
Reproduced on Windows at
6594538bvictory shadersandvictory translate --warm allcan exit successfully and count a shader as cached even though the cache entry could not be written. A subsequent game launch therefore still has to translate it. #29 deliberately keeps the translation in memory when runtime caching fails; that behavior should stay. What differs is the success contract of an offline command.Title-free repro: Run
victory shaders --jobs 1on a directory with the synthetic compute fixture in the diff below, using a disposable cache. Replace the one published shader entry with a directory at the same path and rerun. With stock main,shadersstill says1 shaders in the cacheand exits 0;translate --warm allalso counts it as successful and exits 0. The warning is not propagated to those commands.Proposed fix: Carry a per-call cache hit/write/failure outcome rather than inferring it from a process-global miss counter. Both offline commands count only on-disk entries and return nonzero for cache I/O failures, separately from normal unsupported shaders. A matching entry published by a different writer still counts; a different or unreadable entry does not. Gameplay keeps its in-memory fallback. No cache format or translator version change.
Validation: Same optimized profile and inputs on stock and patched
6594538b: normal writes exit 0 on both. Blocking the entry gives the false success on stock; patched commands exit 1 and report one cache I/O failure, with the separate unsupported input still reported as unsupported. Five shader cache tests, seven pipeline cache tests, and the title-free CLI integration test passed on Windows. This is a correctness fix for prewarm, not an FPS claim.Applicable source-only diff against
6594538bSave the contents of the block as a patch and apply with
git apply. No executable or title assets required for the regression.