Keep the shader cache warm across emitter test edits #1906
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1908"
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?
Imported from Marvisak/VIctory. Originally posted by necrobytes on 2026-11-25T00:38:20Z.
Editing one of the Windows emitter tests sends the next build to an empty shader cache. I reproduced this on
mainby warming the cache with two synthetic compute shaders, applying only the test additions from #1877, and rebuilding. Both shaders missed, and both compiled to exactly the same DXIL as before.This marks the nine standalone emitter test modules with a leading
#![cfg(test)]. The translator fingerprint skips Rust sources with that explicit guard. Removing the guard puts the file back in the fingerprint, including when its name still ends in_tests.rs. Adopting this change causes one cache rebuild because the build script itself is part of the fingerprint.I repeated the check in separate release processes on Linux with Rust 1.98.1.
The new regression edits a copy of the real
valu_tests.rs, changes a translator source, and removes the test guard. It fails at the test-only edit assertion when the build script hashes every source as onmain.cargo test --locked -p victory-shaderon Linux passed 145 tests, including the new regression. Two existing tests were marked ignored.x86_64-pc-windows-msvcwith all targets and warnings denied, both with default features and with--all-features. The repository asset-policy check passed.Tracked as
NEW-47. Claim in #1633Implemented and tested with Codex.
Imported from Marvisak/VIctory. Originally posted by necrobytes on 2026-11-25T00:48:32Z.
I updated this branch to include upstream’s Windows test change,
42363ab, and compared the hosted run on the new PR head (1a0d45c) with the run on that exact base. Both Clippy steps passed. The shader unit suite reported 244 passed, 2 failed, and 3 ignored on both revisions, with the same diagnostics.gathers_at_a_level_match_the_hardwaregot[66, 67, 35, 34]for lane 4 and expected[65, 66, 34, 33].permutes_read_the_lane_named_and_zero_from_lanes_left_outreportedhardware: no pipeline for a wave of 32.The hosted workspace run stopped before the new integration test. I ran that test separately on the final PR head on Linux and as a Windows executable under Wine 11.21. It passed on both. I also repeated the release cache probe on that head. The test-only change kept both cache hits, and the production edit recompiled both shaders. PR run · Base run
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:47:14Z.
Review: APPROVED
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main
940d32f69b,cargo test -p victory-shader --locked.144 passed / 0 failed / 2 ignored (+1 doc-test-ish extra line). Test-infra only: keeps the shader cache warm across emitter test edits so tests don't spuriously rebuild — no product change.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T08:20:10Z.
Automated triage for the maintainers.
Needs work: this needs the maintainer's decision (unchanged). The new head
8f9e528is only a merge ofmaininto the branch. The PR's own diff is byte-for-byte the same as the previously triaged head32a7b7b, so the earlier reading stands.crates/victory-shader/build.rsmoves the hashing intosource_hash, which skipssrc/**.rsfiles that begin with#[cfg(test)]. The nineemit/*_tests.rsmodules get that guard, andtests/source_hash.rschecks three cases: a test-only edit keeps the hash, a translator edit changes it, and removing the guard puts the file back in the hash.tempfilebecomes a dev-dependency (Cargo.toml,Cargo.lock). By my reading the logic is sound, but changes to the build script and to dependencies are left to the maintainer by policy.The open questions for the maintainer are the same:
#[cfg(test)]the convention wanted for keeping the shader cache warm?tempfileorstd::env::temp_dir()?CI: passing (
check).Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 11:05:27 +00:00
Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T11:32:13Z.
Offline measurement on a retail dump
Result: no count change against
main.I merged head
32a7b7b6ontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
upstream-sync referenced this pull request2026-11-25 20:06:11 +00:00
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.