Keep shader cache hits when the dump directory changes #880
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!880
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-880"
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?
@Lkxex on GitHub · 2026-11-25 11:37 UTC · original
Lkxex:fix/shader-cache-dump-directory→main· +16 −6 · 2 files · 1 commits · openProblem
VICTORY_EMIT_DUMPselects an output directory for the translation tools. The shader build script also adds it to the translation fingerprint, so changing or clearing that path causes misses in an otherwise reusable shader cache.Fix
Exclude the dump directory from the generated cache settings list. The regression test checks that the fingerprint excludes the dump directory and still includes
VICTORY_SHADER_OPT, which controls emitted DXIL.Validation
cargo test --locked -p victory-shaderpassed with 216 tests passing and 3 ignored.git diff --checkpassed.AI-assisted change. Validation used the repository's tests without game files.
@avt0m4t48 on GitHub · 2026-11-25 12:00 UTC · original
I independently checked
f85101b6095e8cf3cecf8f0647cc7f5428daa177against8d4a671c54fa9ab83254ab1a1623e401299b1f09. I compiled each revision’s unchangedshader_cache.rswith its own shader and pipeline crates and calledwarm()in separate Linux processes against an on-disk cache. The inputs were two synthetic compute shader containers.VICTORY_EMIT_DUMPto either of two new paths caused a miss on base. On the PR head, both changes hit the entry warmed with the setting unset. Empty and unset paths also hit that entry.VICTORY_SHADER_OPTstill caused a miss and changed the emitted DXIL. A different container still caused a first-use miss. Each fixture emitted identical DXIL across the two revisions at matched settings.The 24 per-revision lookups and five upgrade and rollback lookups matched expectations. Linux
victory-shader --libpassed 171 tests at base and 172 at head, with two ignored each. On the head,cargo check --target x86_64-pc-windows-msvc -p victory-shader -p victory-gpu --all-targets --features blake3/purepassed. Native Windows execution and CLI dump-file writing were outside these checks.@MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
8d4a671intomainf85101bin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warningsfails with exactly the errorsmainitself has on this machine (placed_filler_twins,depth_written, a sort; PR #841 fixes them), also with--all-features; this PR adds none.cargo test --workspace --locked: run 1: 556 passed, 0 failed, 11 ignored; run 2: 556 passed, 0 failed, 11 ignored (mainalone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.