startup-tools: warn when the shader cache and the translator come from different revisions #2815
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#2815
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?
@tedin7 on GitHub · 2026-11-26 11:16 UTC · original
Part of #870
Problem.
tools/startup/run.ps1 -Render -Translatestartstools/startup/gfx2hlsl.py --watchfrom the repo checkout next to the script, while the runtime stand-ins come from whatever build the user last compiled. The request key on both sides starts with a shader revision string (x2w-startup-shader-<n>insrc/startup_stubs/d3d12_draw.inlandx2w-startup-shader-<n>csfor compute, mirrored ingfx2hlsl.py). That revision moves often on main.If the checkout is updated (
git pull) without rebuilding, or a shader cache from an older build is reused, the two revisions differ. Then every cached request is refused withcompute request files do not match the key in their nameorshader request source key mismatch, and nothing intranslate.txtsays the real cause is a version mismatch. A run looks like "nothing translates" when the fix is just "rebuild, or use the matching tools".Proposal (launcher/runtime side, no change to the translation itself).
X2W_SHADER_CACHE/revision.txt.run.ps1(andrun.sh) compare that file with the revision in thegfx2hlsl.pyit is about to start. On mismatch: print one clear warning naming both revisions and the two fixes (rebuild from this checkout, or start with an empty cache folder). A cache folder from an older build that has norevision.txtgets the same warning when it already holdsreq_*files.-FreshShaderCacheswitch that moves the old cache aside.Tests. A Linux check for the comparison helper (same revision: silent; different: warning with both values; old cache with no revision file: warning). A Windows check that runs the built stand-in once and confirms
revision.txtmatches the revision ingfx2hlsl.pyat the same commit, so the two cannot drift silently.github-bot referenced this issue2026-11-27 01:24:57 +00:00
@tedin7 on GitHub · 2026-11-26 11:16 UTC · original
Taking this one; a Draft PR will follow.