Shader cache: the host max wave is part of the key #379
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!379
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/379/head"
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?
@Melow-code on GitHub · 2026-11-25 00:10 UTC · original
fix/shader-cache-host-max-wave→main· +98 −26 · 2 files · 1 commits · closed without mergingThe shader cache key covered our executable, the loop limit, which group barriers wait, the wave-form switches and the clean-up passes — but not the host GPU's maximum wave size, which the device creation sets and the lowering reads. A cache built on an AMD GPU (64-lane waves) served its wave64 translations to an NVIDIA GPU (32-lane waves): the driver refused the PSO, or the shader ran with wrong lane semantics. Reported upstream in VIctory #1844, written with Claude Code; this fix was developed with DeepSeek V4 Pro (OpenCode).
The key now carries the host max wave too,
0before a device exists. The parts of the key moved into a purekey_bytes, so a test can cover them without a device: the same settings make one key, a changed loop limit another, a changed view-heap null slot another, and 32, 64 and 0 lanes three keys. The host max wave also has its own accessor in the emit ofvictory-shader, next to the loop limit and the other settings the cache keys on. Rebased onmainafter the view-heap clamp of #31714delanded:key_bytescarries that limit too.Verification
cargo test --locked -p victory-shader --libon Linux: 171 passed, two ignored.the_key_covers_the_host_max_wavecovers the key bytes without a device: the same settings make one key, a changed loop limit another, a changed view-heap null slot another, and 32, 64 and 0 lanes three keys.The
victory-gpucrate is Windows-gated; its build and the GPU cache run need a Windows host, outside this run.Assisted-by: DeepSeek V4 Pro (OpenCode)
@Melow-code on GitHub · 2026-11-25 12:02 UTC · original
Superseded by upstream's own fix:
translation_fingerprintin the shader crate now includeshost_max_waveandview_heap_limit, and the cache key works per lookup, so a translation made before the device said its wave size is never filed under the later key. Closing this one — the maintainer's solution is the better shape. Thanks for the review.@Melow-code on GitHub · 2026-11-25 12:03 UTC · original
Superseded upstream: main now keys the cache on
translation_fingerprint(), which carrieshost_max_wave()andview_heap_limit()and is worked out per lookup, so a translation made before the device said its wave size is never filed under the later key. That covers this PR's fix in the maintainer's own shape (8dd30ab). Closing this one — no rebase needed, the bug is closed in main.Pull request closed