Shaders: preserve translated cache across unrelated rebuilds #757
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/762"
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?
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-24T04:49:43Z.
Part 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
Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T05:09:33Z.
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.
xcl pipelines) #750upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00