feat(build): an update to a version that translates shaders differently keeps the pipelines and the notes #220
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!220
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/LongshotLauncher:feat/keep-pipelines-across-translators"
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?
An update to a version that translates shaders differently now keeps the old build's driver pipeline cache and pipeline notes. Today it keeps nothing, and the new build's preparation compiles every pipeline cold: 83 minutes on my RX 6700 XT, hours on many AMD PCs.
Why:
ShaderCaches.KeepreturnedOtherTranslatorand kept nothing when the two versions' translator stamps differ. But most of a new translator's SPIR-V is the old one's (99.6% between a stable and a nightly), so the driver's pipelines for it still serve. The game side, Longshot MagicBeanDev/Longshot#1927 (on MagicBeanDev/Longshot#1926), carries another translator's pipeline cache within a bound and keeps its notes; with this change the launcher hands them over. Measured there: the launcher's preparation after a translator change takes about 2¼ minutes instead of 83.What changed (
Core/ShaderCaches.cs,App/ViewModels/BuildStepViewModel.cs):Keepkeeps the pipeline side when the old build has a driver pipeline cache (CachesResult.PipelinesOnly). That'slongshot_vk_pipelines.binand its play files, moved or copied as before, plus its.stamp, its.baseand the notes (longshot_pipelines.bin), always copied.NoCachesorOtherTranslator.longshot_vk_pipelines.baseis a cache too (Free up space, cold build). It sits in its ownNewerlist untiltests/longshot.refpins a Longshot that has it, becauseNamesis checked against the pin.shader caches: the pipelines and notes of nightly-… moved (…); its programs are not kept (another translator, none translated, or its tools are gone) and are translated again. No text the player sees changes.A Longshot from before the game side drops a carried cache at its start by its stamp, as it did its own: a wasted move, nothing worse.
How it was tested
Windows 11 Home 10.0.26200, .NET SDK 10.0.404, on main
415358b.ShaderCacheChecks, in a folder of their own):OtherTranslator);dotnet build -warnaserroris clean.Not tested: a launcher update across a real translator change against the game side. That needs both merged and two nightlies on either side of a translator change.
🤖 Generated with Claude Code
Recommendation: Request changes. A failed update can leave the old build without its driver pipeline cache. The claimed preparation-time improvement is also unproven for this launcher change.
The change carries pipeline caches and notes into builds with a different or unknown shader translator, potentially reducing preparation time. It adds transfer and storage costs, and its rollback does not preserve the old cache if the new game discards it before the build fails.
Does it help: Unproven. The description reports 83 minutes versus about 2¼ minutes on an RX 6700 XT for the game-side change, but does not identify repeated comparable runs or demonstrate an update with this launcher change. It explicitly says a real update across a translator change was not tested.
Other systems: The transfer applies on Windows and Linux, including Steam Deck, and to all GPU vendors. Cross-drive copies consume space and time; their cost is not measured. Older game versions can discard the transferred cache, and the game-side compatibility and bounds could not be verified from this checkout.
Switches: None.
Reviewed:
b0e80ffd67against415358bbcd: Read AGENTS.md and CONTRIBUTING.md, the commit and all three file diffs. Read the changed cache transfer and undo paths, their build caller, and the relevant test sections; other portions of the three changed files were skimmed because output was truncated. Checked cache clearing references and the README description. No review checklist or pull request template was present. No recorded run logs or translations were supplied; the game-side repository was unavailable.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
Suggestions (the author may take or leave)
Testing: Read-only review; no code, tests, builds or scripts were run. The author reports a clean build and core checks on Windows, with eight existing Windows-only groups failing, but no real translator-change update.
Overlaps and merge order: The described Longshot game-side change is a dependency for the intended gain; its actual pull request and merge status could not be verified from the supplied placeholder link. No other overlaps were available.
Automated code review by BeanBot (gpt-6.1-terra), on the pull request's opening. Nothing was run; a maintainer decides.
@ -361,3 +399,3 @@// (the new folder has them all: the old names go. One that stays, a file something holds open, is the same// file under two names, which two builds of one translator can both read)foreach (var f in files.Where(c => c.Name != Notes))foreach (var f in files.Where(c => c.Name != Notes && !(pipelinesOnly && CarriedStamps.Contains(c.Name))))Please preserve the old pipeline cache until the build succeeds. An older target game can discard the transferred cache at startup; if the build then fails, Undo has no file to move back, so the still-installed old build loses its cache. Please also test undo after the target deletes or replaces it.
@fix
I changed this pull request where the review's points could be done here: the new head is
28c722180c.Changed
Left for the author
Nothing was built or run: check the change. It will be reviewed again.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. The reviewed head still has the previously reported rollback defect, and the claimed preparation-time gain has not been demonstrated end to end for this launcher change.
The change carries driver pipeline caches and notes across translator changes, potentially reducing shader preparation time at the cost of transfer time and storage. The checkout is still
b0e80ffd, the commit reviewed previously; the reported fix at28c722180cis not available here, so its rollback fix and README update cannot be verified.Does it help: Unproven. The description reports 83 minutes versus about 2¼ minutes on an RX 6700 XT for the game-side change, but gives no repeated comparable launcher updates and says a real update across a translator change was not tested. Transfer time and storage costs are also unmeasured.
Other systems: The transfer applies on Windows and Linux, including Steam Deck, and across GPU vendors. Older game versions can discard the carried cache; compatibility and cache bounds in the game-side changes could not be verified from this checkout.
Switches: None.
Reviewed:
b0e80ffd67against415358bbcd: Reviewedb0e80ffdagainst415358bbcdand the supplied earlier review and comments. Read AGENTS.md, CONTRIBUTING.md, the commit and all three diffs; inspected the cache transfer and rollback, build caller, relevant test sections and README cache description. Other portions of the changed files were skimmed because output was truncated. No review checklist or pull request template was found. The reported later commit and game-side repository were unavailable; no recorded run logs or translations were supplied.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
Suggestions (the author may take or leave)
28c722180cfix when that commit is available in the checkout.Testing: Read-only review; no code, tests, builds or scripts were run. The author reports a clean build and core checks on Windows, with eight existing groups failing, but no real translator-change update. The required Tooling release check and CI smoke run were not reported.
Overlaps and merge order: The described Longshot game-side changes are dependencies for the intended gain; their contents and merge status could not be verified. No other overlaps were available.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@fix
I didn't change this pull request: what the review asks needs the author.
Already done
28c722180c: The checkout is at28c722180c. The rollback fix and README description are present in Core/ShaderCaches.cs:339 and README.md:443.Left for the author
Nothing was pushed.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
WIP: feat(build): an update to a version that translates shaders differently keeps the pipelines and the notesto feat(build): an update to a version that translates shaders differently keeps the pipelines and the notes