First incremental build after a DXIL source deletion can miss valid shader-cache entries #2033
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#2033
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@lewisnic94-max on GitHub · 2026-11-25 01:21 UTC · original
After #1947 merged at
0f293bec8fd53b1478328627a1f08a6155dd2813, the first Cargo build after deleting a nested translator source can retain the fingerprint that included it. I reproduced this with the merge commit’s build script and source inputs, again on mainb8428c5efe826a63994d0f8723846f8bb4cd3666, and on the closing tipaa9ab8a3e7b738ec48899e37805f6a7d2d22da53.On Windows, set
XCL_DIRECT_DXIL=1and populate a direct compute cache. Add a comment-onlycrates/xcl/src/gpu/dxil/module/review_temporary_input.rs, build, remove the file, then build once more against the original cache. The restored source tree should select its previous entries. On reviewed head1831ec4a5abb1c3ae0ca4ab3803776f7fafe30cbthe first build missed the original entry. Three separate runs of a synthetic MSAA shader wrote a second cache entry containing identical DXIL. The following Cargo build recovered the original fingerprint.With the merged sources, the initial fingerprint was
ea4eb18707b545fe. After removal the first build keptfdef19ef4a8e639a. The next build restored the initial value. In eight repeated add/build/remove/build cycles on the PR’s build script, the first post-deletion build kept the stale value 8/8 times. Keeping the directory watch for additions and emittingcargo:rerun-if-changedfor each hashed file restored the initial value on the first build in 8/8 cycles. A regression test should compare the first post-removal Cargo build with a clean build. Build-script directory watchP3, high confidence. The measured impact was an unnecessary shader translation and disk entry. Windows 11 build 26200.9974, Ryzen 7 5800X, RTX 3080 driver 616.92, Rust/Cargo 1.100.0 MSVC. Codex (GPT-6) assisted with the reproduction, measurements and analysis.
@JJAutoCompare on GitHub · 2026-11-25 01:33 UTC · original
Tested
Independent Windows reproduction using the exact
crates/xcl/build.rsfrom live main8f5fca5bb9ad6e695093d75294ad2cec023bba60(blob311d5c923ca88ae8fbba2da8864b4a7381341d08). Windows 11 Enterprise Evaluation x64 build 26200.9974, NTFS, Ryzen 7 3800X, Rust/Cargo 1.100.0 MSVC, dev profile.A dependency-free probe printed the three IDs compiled into its binary. Its inputs were comment-only stand-ins at the 17 fixed translator paths and two permanent DXIL paths (
src/gpu/dxil/mod.rsandsrc/gpu/dxil/module/mod.rs). I addedsrc/gpu/dxil/module/review_temporary_input.rs, built, removed it, and built twice against the same incremental target. An independent clean target on the original source tree provided the comparison ID. I ran eight cycles each with upstream and with a local variant that keeps the directory watch and also watches each hashed DXIL file. Every step usedcargo build --offline --target x86_64-pc-windows-msvc -vv, then ran the resulting probe.7be018e2e33349c17be018e2e33349c1in 8/8ff8092c268136b11in 8/87be018e2e33349c1ff8092c268136b11in 8/8ff8092c268136b11in 8/8Both clean controls produced
ff8092c268136b11. The other two IDs matched throughout. All 52 Cargo invocations and 52 probe runs exited 0, with no skips. The regression assertion exited 1 upstream (0/8 first builds matched clean) and 0 with both watches (8/8). Cargo reported the upstream first post-removal build as fresh. With both watches, it reported the missing file and reran the script on that first build.Not tested
XCL workspace build or tests, GPU, titles, or shader-cache I/O. This run measured the compiled-in source ID.
AI use
Codex in T3 Code (
gpt-6.2-sol) wrote and ran the fixture and prepared this report.@Decodere on GitHub · 2026-11-25 01:43 UTC · original · edited 2026-11-25 02:03 UTC
Since PR
#2047has been opened for#2033, we dropped our local branch and are stepping back to avoid duplicate PRs.