Skip to content

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

Merged
NotRexed merged 3 commits into
NotRexed:mainfrom
monsterlag:fix/shader-stamp-cache-scope
Nov 8, 2026
Merged

NotRexed merged 3 commits into
NotRexed:mainfrom
monsterlag:fix/shader-stamp-cache-scope

Conversation

@monsterlag

@monsterlag monsterlag commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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.

@NotRexed

NotRexed commented Nov 8, 2026

Copy link
Copy Markdown
Owner

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.

@NotRexed
NotRexed merged commit b234b43 into NotRexed:main Nov 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants