Rebuild shader fingerprint after translator source edits #4001
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4001
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4001"
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?
@Blitzball996 on GitHub · 2026-11-30 14:11 UTC · original
Blitzball996:pr/fix-shader-cache-invalidation→main· +776 −820 · 33 files · 11 commits · closed without mergingWhat changes
Emit a Cargo
rerun-if-changeddirective for each Rust source file included in the shader translator fingerprint. Editing an existing nested translator source file now reruns the build script and refreshes the fingerprint compiled into the executable.Validation
cargo build --locked --release -p victorypassed on the original patch.cargo check --locked -p victory-shaderpassed on the updated main base.git diff --checkpassed.Hardware validation
344fc0d96eto5f6e73ca9b@babuakhil on GitHub · 2026-11-30 17:16 UTC · original
Checked on Windows 11 with Cargo 1.98.1 (pinned), on
main(84bd61e2). I couldn't reproduce the problem this fixes: onmain, an edit to a nested translator file already reruns the build script and changes the fingerprint.One checkout,
cargo check -p victory-shader, a comment appended tosrc/emit/lower.rs, then reverted:emit/lower.rseditedmain34c7428dd60d…605158a35e43…(changed)34c7428dd60d…34c7428dd60d…605158a35e43…(changed)34c7428dd60d…mainalready printscargo:rerun-if-changed=src, and Cargo scans a directory given there for changes all the way down, so the per-file lines don't change when the script reruns. If you have a case wheremainmissed an edit (a particular Cargo version, or adding or removing a file), it would help to say which.One interaction to know about, with #3799: when two checkouts share a
CARGO_TARGET_DIR, Cargo reuses the compiled build script, and onmainit scans the first checkout'ssrc(env!("CARGO_MANIFEST_DIR")is compiled in). With this PR alone, that run also prints the first checkout's absolute paths, so the second checkout's build watchedD:\zz-wt1\…\emit\lower.rsinstead of its own files. With #3799 applied too, the paths and the fingerprint are the second checkout's own (details on #3799).5f6e73ca9bto720abfd280@trustno1-coder on GitHub · 2026-12-01 18:47 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed