Keep the shader cache warm across emitter test edits #1908
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!1908
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@necrobytes on GitHub · 2026-11-25 00:38 UTC · original
necrobytes:fix/shader-cache-test-sources→main· +80 −12 · 13 files · 4 commits · openEditing 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.
@necrobytes on GitHub · 2026-11-25 00:48 UTC · original
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
@Marvisak on GitHub · 2026-11-25 08:20 UTC · original · edited 2026-11-25 20:20 UTC
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
@sinan-cmyk on GitHub · 2026-11-25 11:32 UTC · original
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).
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.