Shader cache: key entries on the host's widest wave #2369
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2369
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2369/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 12:04 UTC · original
upstream-cache-fix→main· +65 −16 · 3 files · 1 commits · closed without mergingThe cache key covered the translator, the encoding and the loop limit but not the host GPU's maximum wave size. A cache built on a 64-lane host (AMD) served its wave64 translations to a 32-lane host (NVIDIA): the driver refused the PSO, or the shader ran with wrong lane semantics.
The key now carries the host max wave too,
0before a device exists. The existing key test covers the new part: 32, 64 and 0 produce three distinct keys.Changes
victory-shader/src/emit/lower.rs:HOST_MAX_WAVEAtomicU32,set_host_max_wave(call once fromHost::new),host_max_waveaccessor.victory-shader/src/emit/mod.rs: re-exportsset_host_max_wave, publichost_max_wave.victory-gpu/src/shader_cache.rs:keyhasheshost_max_wave; the existing test covers 0, 32 and 64.Verification
cargo test -p victory-shader --libon Linux: 144 passed, 0 failed, 2 ignored.victory-gpucrate is Windows-gated; its build and the GPU cache test need a Windows host.Fixes #1844.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 [email protected]
@Marvisak on GitHub · 2026-11-25 14:51 UTC · original
Automated triage for the maintainers.
Proposed close: the change has no effect.
set_host_max_wave(crates/victory-shader/src/emit/lower.rs) is defined and re-exported but never called; the PR adds no call fromHost::newor anywhere else. Sohost_max_wave()is always0, andentry_key(build(), 0)incrates/victory-gpu/src/shader_cache.rsonly renames every key once. Nothing in the lowering readsHOST_MAX_WAVEeither (andmainhas no host-wave input to translation at all), so even with a caller the key would track a value the translation does not depend on. The new test checks thatkeyhashes its fourth argument, not that the cache separates hosts. The doc comment on the key test is also duplicated.What would change this: show a translation in
mainthat differs by host wave size, wire the value from device creation, and test that two hosts get different entries. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes thetriage: proposed closelabel.CI:
checkpassing.Generated by Claude Code
Pull request closed