Fail offline shader commands when a translation is not cached #352
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/TaynanGT--Vice-Tay!352
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-352"
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?
@zmelumian972 on GitHub · 2026-11-27 19:16 UTC · original
zmelumian972:fix/offline-shader-cache-failures→main· +88 −33 · 4 files · 1 commits · closed without mergingFixes #185.
victory shadersandvictory translate --warmcounted a shader as cached and exited 0 even when its cache entry could not be written, so the next run translated it again.Change
shader_cache::cached_byrecords, in a thread-local, why its translation stayed off disk (write failed, or the entry never read back). The work runs synchronously on each worker thread, so the per-thread value is per call.precompilereturnsPrecompiled::{Cached, Translated, NotCached(why)}instead ofbool. If no cache could be opened, every shader isNotCached.NotCachedon its own (… N could not be cached) and exit nonzero with the first reason. Shaders that don't translate are still reported as before.d3d12x::warm_shaderis removed: it only re-mappedprecompile.This is a smaller version of the patch proposed in the issue (+88/−33). It doesn't change
cached's return type or the wording of the existing tests.Validation
Linux, GE-Proton11-14 (Wine), RTX 5090,
diagbuild, using the issue's synthetic compute fixture with the published entry replaced by a directory:10675b5shaders, normal1 shaders in the cache, exit 00 could not be cached, exit 0shaders, entry blocked1 shaders in the cache, exit 00 shaders in the cache, 1 do not translate, 1 could not be cached,could not cache 1 shaders (the first: Access denied. (os error 5)), exit 1translate --warm all, entry blocked1 translated now, exit 00 translated now, 0 in the cache already, 1 do not translate, 1 could not be cached, exit 1Tests under Wine:
victory-gpushader_cachetests pass (4/4).a_failed_cache_write_keeps_the_translationnow also checks that the failure is reported.victoryapp tests pass.victory-hletests (only_loopback_is_reachable,a_kept_blob_past_the_link_limit_is_copied) fail the same way on stock under the no-network sandbox and Wine, so they're unrelated.victory-gpusuite to completion under Wine (it hangs there), so Windows CI covers the rest.This is a correctness fix for prewarming, not an FPS claim.
🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 19:36 UTC · original
@zmelumian972 I built on this in #356. The cache lookup now returns its own outcome, so a miss on one worker can’t count as a write on another. It also leaves the precompile marker pending when any translation stays off disk. Your work is credited on the commit, and Windows CI is running there.
Pull request closed