build: avoid unrelated rebuilds when the shader translator stamp changes #788
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!788
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/shader-stamp-cache-scope"
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?
The translator stamp is passed to every Vulkan renderer compilation, although only
vk_shader.cppconsumes it. Pass the existing definition only to that consumer so translator changes stop invalidating unrelated object-cache keys.Preserve upstream's bank-source input from #793, the hash/CRLF normalization, object-key construction, header dependencies and other flags. Removing the irrelevant flag causes a one-time cache-key transition; later translator or bank-only changes retain unrelated objects.
Six authored Python tests execute the actual job construction and key functions in Windows/Linux modes. They cover translator/bank changes, own-source/header invalidation, line endings and release/version flags. The current-main negative fails the intended selective-invalidation assertion in both modes. The bank-inclusive stamp and every non-stamp flag match upstream exactly. Focused cache, bank-stamp and BC3 checks pass. No full-game build or throughput benchmark is claimed for this build-script change.
The ordinary merge includes main15ec and the merged #806 baseline correction. CI for this refreshed head is pending.
Thanks! #793 was just merged: it adds gpu/vk/vk_bank.cpp to the shader stamp inputs, so this PR's fixture in tests/test_shader_stamp_cache.py now fails with FileNotFoundError for gpu/vk/vk_bank.cpp (10 errors). Could you rebase onto main and add vk_bank.cpp to the fixture's files? The build.py change itself looks right.