fix(victory-shader): exclude non-translation switches and test files from shader cache key #301
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!301
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-301"
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?
@mauroalvare on GitHub · 2026-11-26 01:52 UTC · original
mauroalvare:fix/victory-shader-cache-switches→main· +98 −1 · 2 files · 3 commits · openChange
Stops non-translation switches and test/utility files from polluting
VICTORY_SHADER_SWITCHESandVICTORY_SHADER_SOURCE_HASHinthird_party/victory/crates/victory-shader/build.rs(basec4c93bdc413191a9dc909998d2d53080a3f0c880).Previously,
victory-shader/build.rswalked every.rsfile undersrc/(including*_tests.rs, the uncompiled orphanemit/desc_data_tests.rs,emit/host.rs,emit/validator.rs, andemit/bitcode/census.rs) and scraped every"VICTORY_*"string literal intoVICTORY_SHADER_SWITCHES, whichemit::translation_fingerprint()hashes into the on-disk shader cache key. As a result:VICTORY_D3D12_DEBUG=1(fromemit/host.rs),VICTORY_WAVE_WHY=1,VICTORY_DESC_WHY=1,VICTORY_SHADER_CENSUS=<file>,VICTORY_WARP=1, orVICTORY_DXIL=<path>invalidated 100% of the shader cache even though none of them change the emitted DXIL.tools/lancer_victory.ps1(which setsVICTORY_DESC_DATA=1) and-NoTunedSettings(which leavesVICTORY_DESC_DATAunset) also invalidated 100% of the shader cache, even though no compiled code readsVICTORY_DESC_DATA(it only exists in the uncompiled orphanemit/desc_data_tests.rs).VICTORY_SHADER_SOURCE_HASHandVICTORY_SHADER_SWITCHESthemselves (fromenv!(...)inemit/mod.rs) were scraped intoVICTORY_SHADER_SWITCHES.*_tests.rsunit-test file invalidated the shader cache viaVICTORY_SHADER_SOURCE_HASH.What changed:
*_tests.rs,emit/host.rs,emit/validator.rs, andemit/bitcode/census.rswhen computingVICTORY_SHADER_SOURCE_HASHandVICTORY_SHADER_SWITCHES.*_WHY,VICTORY_SHADER_SOURCE_HASH,VICTORY_SHADER_SWITCHES,VICTORY_REF_VS,VICTORY_REF_PS) fromVICTORY_SHADER_SWITCHES.VICTORY_F16_NEAREST,VICTORY_GROUP_SYNC,VICTORY_SHADER_OPT,VICTORY_SHADER_LOOP_LIMIT,VICTORY_WAVE_*,VICTORY_STRICT_JOINS, etc.) remain inVICTORY_SHADER_SWITCHESand still invalidate the cache as expected.Linked issue: N/A
Verification
Base reproduction (
c4c93bd, before the fix):After the fix (
ab7ee46):No GPU execution is needed for this build-script / fingerprint test (pure CPU); verified on Windows x64 (Ryzen 7 9700X, RTX 5070 Ti, 32 GB RAM).
Oracle and test data
New integration test
third_party/victory/crates/victory-shader/tests/fingerprint_switches.rstoggles 11 non-translation switches and verifiestranslation_fingerprint()is unchanged, then togglesVICTORY_F16_NEAREST=1and verifiestranslation_fingerprint()changes. Fails on basec4c93bdand passes with this change. No game, console, or SDK files were used.Checklist
E_NOTIMPL), never a fake success.test_readme_sync.pychecks it).AGENTS.mdallows (names, slots, argument shapes, flag values, HRESULTs, IIDs, counts), with how they were obtained; no address or RVA.THIRD_PARTY.md.Made with AI assistance (Antigravity).
ab7ee466f5to5f0ae140b4fix(victory-shader): exclude non-translation switches and test files from shader cache keyto fix(victory): exclude shader tests from the active cache source hashfix(victory): exclude shader tests from the active cache source hashto fix(victory-shader): exclude non-translation switches and test files from shader cache key5f0ae140b4toe6518be3cfView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.