Rebuild shader fingerprint after translator source edits #4001

Closed
github-bot wants to merge 11 commits from github-bot/gh-4001 into main AGit
Owner

@⁠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 merging

What changes

Emit a Cargo rerun-if-changed directive 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 victory passed on the original patch.
  • cargo check --locked -p victory-shader passed on the updated main base.
  • git diff --check passed.
  • CI is running again against the updated main base.

Hardware validation

  • GPU and profile: not run
  • Frame generation: not run
  • Ray tracing: not run
**@⁠Blitzball996** on GitHub · 2026-11-30 14:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4001) `Blitzball996:pr/fix-shader-cache-invalidation` → `main` · +776 −820 · 33 files · 11 commits · closed without merging ## What changes Emit a Cargo `rerun-if-changed` directive 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 victory` passed on the original patch. - `cargo check --locked -p victory-shader` passed on the updated main base. - `git diff --check` passed. - CI is running again against the updated main base. ## Hardware validation - GPU and profile: not run - Frame generation: not run - Ray tracing: not run
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 14:14:21 +00:00
github-bot force-pushed github-bot/gh-4001 from 344fc0d96e to 5f6e73ca9b 2026-11-30 15:10:53 +00:00 Compare
Author
Owner

@⁠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: on main, 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 to src/emit/lower.rs, then reverted:

clean emit/lower.rs edited reverted
main 34c7428dd60d… 605158a35e43… (changed) 34c7428dd60d…
this PR 34c7428dd60d… 605158a35e43… (changed) 34c7428dd60d…

main already prints cargo: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 where main missed 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 on main it scans the first checkout's src (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 watched D:\zz-wt1\…\emit\lower.rs instead of its own files. With #3799 applied too, the paths and the fingerprint are the second checkout's own (details on #3799).

**@⁠babuakhil** on GitHub · 2026-11-30 17:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4001#issuecomment-7286005810) Checked on Windows 11 with Cargo 1.98.1 (pinned), on `main` (`84bd61e2`). I couldn't reproduce the problem this fixes: on `main`, 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 to `src/emit/lower.rs`, then reverted: | | clean | `emit/lower.rs` edited | reverted | |---|---|---|---| | `main` | `34c7428dd60d…` | `605158a35e43…` (changed) | `34c7428dd60d…` | | this PR | `34c7428dd60d…` | `605158a35e43…` (changed) | `34c7428dd60d…` | `main` already prints `cargo: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 where `main` missed 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 on `main` it scans the first checkout's `src` (`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 watched `D:\zz-wt1\…\emit\lower.rs` instead of its own files. With #3799 applied too, the paths and the fingerprint are the second checkout's own (details on #3799).
github-bot force-pushed github-bot/gh-4001 from 5f6e73ca9b to 720abfd280 2026-11-30 19:03:52 +00:00 Compare
github-bot closed this pull request 2026-12-01 18:50:50 +00:00
Author
Owner

@⁠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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:47 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4001#issuecomment-7321543051) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4001
No description provided.