build: avoid unrelated rebuilds when the shader translator stamp changes #788

Merged
monsterlag merged 3 commits from fix/shader-stamp-cache-scope into main 2026-11-08 23:49:08 +00:00
monsterlag commented 2026-11-08 21:16:16 +00:00 (Migrated from github.com)

The translator stamp is passed to every Vulkan renderer compilation, although only vk_shader.cpp consumes 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.

The translator stamp is passed to every Vulkan renderer compilation, although only `vk_shader.cpp` consumes 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](https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/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](https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/806) baseline correction. CI for this refreshed head is pending.
NotRexed commented 2026-11-08 23:21:35 +00:00 (Migrated from github.com)

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.

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.
Commenting is not possible because the repository is archived.
No description provided.