Shaders: preserve translated cache across unrelated rebuilds #762
No reviewers
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!762
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/762/head"
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?
@bmjask on GitHub · 2026-11-24 04:49 UTC · original
bmjask:shaders/semantic-translated-cache→main· +149 −17 · 4 files · 1 commits · merged 2026-11-24 04:58 UTCPart of #156. The translated-shader disk cache was tied to the complete xcl executable, so profile changes, symbols, and unrelated relinks discarded otherwise compatible translations. This keys a v2 namespace by the translator sources and loaded DXC toolchain while retaining the full request inputs in each entry.
What is in it
Tested
Regression run
Upstream main:
This PR:
Not tested
AI use
@JoaoPauluu on GitHub · 2026-11-24 05:09 UTC · original
Test report: #762 under Wine (Linux, NVIDIA): a second build of the same commit uses the same v2 namespace
This checks the PR's main claim with a cross build from Linux (mingw-w64), where
build.rshashes the sources of a Linux (LF) checkout. Two executables of the same commit share onetranslated/v2/<identity>folder, and the second one wrote nothing new to it.Setup
experimental-11.0-20261112(wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton, DXC 1.9.2609,DXVK_CONFIG="dxgi.hideNvidiaGpu = False"x86_64-pc-windows-gnu(mingw-w64-gcc 16.2.0), release builds of this PR's head242a6eascripts/linux/smoke.shfrom #257,XCL_NETWORK=0What I did
242a6eatwice, in two separate target directories: A and B, executables of different bytes (sha2565a81184d…/f854d641…). I meant B to be a profile change (CARGO_PROFILE_RELEASE_DEBUG=true), but[profile.release] debug = 2is already inCargo.toml, so the only difference is the build directory.translated/*.binfiles from earlier runs of other builds, and nov2.Result
dxil/translated/v2/a4eab38a5d5586ff/with 11 files, all written during A's run (02:06).Not tested
TRANSLATOR_SOURCES(the case the PR is for); Windows; whether a Windows (CRLF) checkout of the same commit gets the same identity as this LF one (build.rshashes the files' raw bytes); the test suite on this branch; amainpairAI use: Claude Code (Claude Opus 5.5) built both executables, ran everything above on the machine above and wrote this report. The counts, times and hashes are from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.