Game: NVIDIA pipeline cache rebuilds on every launch on Windows stable #2316
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#2316
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?
Reported on Discord
Longshot version
Longshot v1.2.0; game build v3.1.1 (as reported). The submitted game log confirms Longshot v3.1.1 (source 63363428).
Channel
Stable release.
What happened
The game rebuilds the pipeline cache on every launch. The reporter says the game itself is launched repeatedly; whether the same installed build is used each time is not confirmed. Expected: pipelines/cache from the previous launch are reused rather than rebuilt.
Where in the game
Startup, while building/loading the pipeline cache.
How often
Reported on every launch.
Graphics card and driver version
ASUS TUF NVIDIA GeForce RTX 4080; driver 621.01.
CPU, RAM and operating system
Windows 11 Pro, latest updates (exact build not supplied). Log reports 64,692 MB RAM. CPU model and exact Windows build unknown.
Logs and reproduction details
The reporter initially attached
launcher.logandlauncher.1.log; these are launcher logs and do not show game pipeline/cache behavior. They later supplied two game logs,longshot_log.2.txtandlongshot_log.4.txt. The readable game log (longshot_log.2.txt) shows the v3.1.1 build, readslongshot_vk_pipelines.bin(about 1.94 GB), merges 9 play cache files, and precompiles 38,020 noted pipelines plus 5,004 compute pipelines in 217.6 seconds. It reports NVIDIA's driver shader-cache limit as “not known”; at start, NVIDIA GLCache is 348 MB. The cache file is not skipped for low RAM (the machine reports about 64 GB). This single readable log shows a substantial precompile but cannot establish what differs between consecutive starts. The other game log is 36 MB and could not be read by the attachment reader, so its corresponding cache messages are not yet extracted.Still needed: identify which of the two game logs is from each consecutive launch and compare their startup/cache messages (especially whether the same pipeline cache file is loaded and whether the 38,020 + 5,004 precompile repeats); exact Windows build and CPU model. Clarify whether the same game build is used and whether a rebuild or driver update occurred between starts.
Related
Longshot#1551 reports pipeline-cache reuse failure on Windows ARM/Adreno, a different GPU and setup; this report does not establish the same cause. PR #2125 (first in nightly-738) reads/logs NVIDIA's shader-cache limit and reads the pipeline cache file when NVIDIA's limit is under 4 GB; the supplied log says the limit is unknown and the machine has 64 GB RAM, so that specific low-limit handling is not shown as applicable here. PR #1418 (first in nightly-447) fixes repeated full precompilation after an update that changes no shader; whether this report matches that condition is not established by the available logs.
Additional report from Discord (Intel Arc 140V)
A separate reporter says on 2026-11-28 that the latest nightly seems to have fixed Arc 140V graphics artifacts and crashes, but shader preparation runs on every start and takes about 30 minutes. They say only
longshot_update.logappeared to update, and attached that file. It is a builder/update log, not the game'slogs/longshot_log.txt; it records nightly-895-22d0d200, a successful build, pipeline cache read as 2,156,117 KB, and 37,824 noted pipelines found with none built during this shader-preparation step (about 8.2 seconds). This does not demonstrate a repeated 30-minute game-start compilation and is not the NVIDIA issue's system; obtain two consecutive game logs and the actual Arc model/driver before treating it as the same problem. Keep this report separate from the NVIDIA finding pending evidence.Files from the Discord report:
Updated with more from Discord: Added the two game logs, extracted v3.1.1/cache details from the readable log, and distinguished the applicable limits of the merged fixes.
Files:
I tried this on an RTX 3080 (NVIDIA 621.14, Windows 11, 64 GB) with a build of the same source as the reporter's v3.1.1 (63363428), and couldn't reproduce it yet.
Here: a full shader preparation, as the launcher runs it (
--prepare-shaders --compile-shaders most), built 38,095 noted pipelines in 245 s and wrote a 1.26 GB pipeline cache. The next start, with the preparation on as in release builds, built the same 38,095 pipelines from that cache in 2.4 s. After a second preparation withallthe cache was 1.55 GB, and starts were still a few seconds.In the reporter's
longshot_log.2.txt:longshot_vk_pipelines.binwas read, and the program cache was kept (47,867 program keys): nothing was translated again.the pipeline cache not written: nothing new since it was read or last written (1895.2 MB): the driver's pipeline cache did not grow by a single byte while those ~23,000 pipelines were built. If the driver had compiled them, they would have been added to it. So they look like cache hits that were slow, not compiles, and the time probably went somewhere outside the driver's compiler.519 listed pipelines were in no cache when their programs were loaded in this session (over 500): ... the next start loads every listed program before the title again.Three things would tell the explanations apart, from the reporter:
longshot_log.txtfiles (the game'slogs/folder keeps the last few aslongshot_log.1.txt,.2, ...). Each one'svk: noted pipelines: ... in N slines and itsvk: precompile:lines are the ones to compare.F:is (the game folder, with itscache/), andC:(the shader store in%LOCALAPPDATA%\Longshot\shaders): an SSD or a hard disk.Not claimed: I'm not working on it now.
If it can help, I have the same issue on Linux, Fedora 45 with a RTX 3080TI
Usually they didn't build all the time and loaded sometimes very fast, but now they rebuild when I open the game and it takes 10+min.
They can rebuild even if I didn't reboot the OS in between sessions.
I tried to reproduce this on current
main(a8f6b4da) and couldn't with the default settings. I also read #2527's log, which turns out to be a different case.This PC: Windows 11, RTX 4070, 63 GB RAM (the report's PC had 64 GB). Two starts in a row of a base built with shader preparation, each closed cleanly.
main, RTX 4070NVIDIA's limit not knownNVIDIA's holds at most 10240 MB(read from the driver's settings)RX_VK_LOAD=create, the default where the GPU has mesh shaders)nothing new since it was readstart-up: the shaders took 2.3 swithRX_VK_LOAD=startThe 217.6 s here came with a full cache file that the start added nothing to, so the driver compiled pipelines the file already held. For scale, this PC's shader preparation compiled the same ~38,000 pipelines from nothing in 63.8 s. NVIDIA's cache limit wasn't known in v3.1.1. Since then the game reads it, and the launcher raises a small one to 10 GB (LongshotLauncher #243, from nightly-172). The 1 GB default is the known cause of "everything compiles again" (
gpu/vk/nvidia_cache_limit.h).#2527 (v3.2.0, RTX 5070) is a different case. Both caches were empty when that start began:
So that start compiled everything for real, then saved a full cache. The game saves the file by writing a temporary and renaming it over the old one (
pipeline_cache_file.h), so a close or crash during the save leaves the old file in place, not an empty one. An empty file at the start means a fresh game folder. A new build or an update without shader preparation gives one, and anrcinstall updates often. AGLCacheof 0 MB means NVIDIA's own cache was emptied too, for example by Windows' Disk Cleanup or Storage Sense ("DirectX Shader Cache"), or a clean driver install.What would settle both: two logs from two launches in a row, with no update or rebuild between them, on v3.2.0 or a current nightly. On the second launch, check these lines:
pipeline cache ... (N KB): the file's size. 0 KB means it was replaced since the last launch.driver shader cache at the start: N MB: NVIDIA's own cache. 0 MB means it was emptied since the last launch.driver shader cache: NVIDIA's holds at most N MB: under 4096 is too small.precompile: ... in N s.If the second launch shows full caches and still takes minutes, that's a real bug and I'll take it. Until then I'm not claiming this one.
From Discord:
The reporter asks whether
longshot_update.logis the log to inspect, saying it is the only log that updates on the next game start. Please clarify that the relevant file islongshot_log.txtin the game folder'slogs/directory (older runs may be retained as.1,.2, etc.), not the launcher's update log. They report repeated shader rebuilding taking about 30 minutes on Intel Arc 140V; the NVIDIA issue may not match their case, so collect two consecutive game logs and the cache details requested in the issue.Updated with more from Discord: Clarified the new Intel Arc attachment is a launcher/builder log from nightly 895 and does not establish a match to the NVIDIA cache issue; documented the specific cache/precompile lines and requested game logs.