Fingerprint shaders from the active Cargo checkout #819

Closed
Kamiloj9 wants to merge 1 commit from upstream-pr/820 into main
Kamiloj9 commented 2026-11-25 08:49:28 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Kamiloj9 on 2026-11-25T08:49:28Z.


Change

Read CARGO_MANIFEST_DIR when Cargo runs the shader fingerprint script. A shared CARGO_TARGET_DIR can reuse a build-script binary compiled in a different checkout. Its compile-time manifest path made the fingerprint describe the other checkout's translator and could reuse stale shader cache entries.

Verification

Reproduced with two actual checkouts and one reused build-script binary. The original binary printed the same source hash for both manifest directories. The corrected binary printed distinct hashes and preserved the original hash for the checkout it previously used. Independent review and staged asset policy passed.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6600683915 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/820). Originally posted by [Kamiloj9](https://github.com/Kamiloj9) on 2026-11-25T08:49:28Z. --- ## Change Read `CARGO_MANIFEST_DIR` when Cargo runs the shader fingerprint script. A shared `CARGO_TARGET_DIR` can reuse a build-script binary compiled in a different checkout. Its compile-time manifest path made the fingerprint describe the other checkout's translator and could reuse stale shader cache entries. ## Verification Reproduced with two actual checkouts and one reused build-script binary. The original binary printed the same source hash for both manifest directories. The corrected binary printed distinct hashes and preserved the original hash for the checkout it previously used. Independent review and staged asset policy passed.
SkillIssueXO commented 2026-11-25 10:11:16 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by SkillIssueXO on 2026-11-25T09:57:27Z.


I reproduced this on Windows with the same Cargo target directory shared by two checkouts. The original fingerprint script reported the same source fingerprint for both when its executable was reused. With this patch, the same executable reports distinct fingerprints for the two active checkouts.

This affected a live renderer test. A reused cache supplied older translations for two compute shaders, leaving out the root constant used by the indirect-dispatch split. A clean cache on the same executable restored that constant for both shaders. In the matched 1080p gameplay view, the stale blocks along the bottom cleared and the indirect-compute truncation counter fell to zero for the measured interval. Other rendering defects remain.

AI-assisted verification.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7159029714 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/820#issuecomment-7159029714). Originally posted by [SkillIssueXO](https://github.com/SkillIssueXO) on 2026-11-25T09:57:27Z. --- I reproduced this on Windows with the same Cargo target directory shared by two checkouts. The original fingerprint script reported the same source fingerprint for both when its executable was reused. With this patch, the same executable reports distinct fingerprints for the two active checkouts. This affected a live renderer test. A reused cache supplied older translations for two compute shaders, leaving out the root constant used by the indirect-dispatch split. A clean cache on the same executable restored that constant for both shaders. In the matched 1080p gameplay view, the stale blocks along the bottom cleared and the indirect-compute truncation counter fell to zero for the measured interval. Other rendering defects remain. AI-assisted verification.
MamaLeVrai commented 2026-11-25 11:10:34 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T10:12:53Z.


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 f2ae713 into main 9376fd6 in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins never used, depth_written never read, in victory-gpu); with --all-features it fails with the same number of errors as main (4). This PR adds none and removes none. cargo test --workspace --locked: 540 passed, 0 failed, 10 ignored, two runs (main alone: 540 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7159387577 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/820#issuecomment-7159387577). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T10:12:53Z. --- 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 `f2ae713` into `main` `9376fd6` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with exactly the errors `main` itself has on this machine (`placed_filler_twins` never used, `depth_written` never read, in `victory-gpu`); with `--all-features` it fails with the same number of errors as `main` (4). This PR adds none and removes none. `cargo test --workspace --locked`: 540 passed, 0 failed, 10 ignored, two runs (`main` alone: 540 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
upstream-sync closed this pull request 2026-11-26 01:05:56 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
fxceless/victory-fork!819
No description provided.