fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB) #2496
No reviewers
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2496
Loading…
Reference in a new issue
No description provided.
Delete branch "windowsarmwrestler/Longshot:fix/adreno-pipeline-cache-split"
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?
Summary
On Windows on Arm (Snapdragon X Elite, Adreno X1-85) every start of the game rebuilt its pipelines: about 11 minutes of "Loading pipelines" each time (42 minutes in #1551's report), and
longshot_vk_pipelines.binwas never written again after the first start.The cause is the driver: Qualcomm's Adreno driver keeps only the first 1024.5 MB put into a
VkPipelineCacheand drops every pipeline after that with no error (31.0.178.0). A game-free probe built 27,267 compute pipelines into one cache: its data stopped at 1024.5 MB, and a cache made from that data held the first 17,458 and none after. A start builds about 2.7 GB of pipelines on this driver (its compute ones, the mesh fallback's and ~43,000 noted graphics ones), so the driver keeps whichever finish first, up to 1024.5 MB, and drops the rest: on every later start most of them are compiled again. (Which ones it keeps depends on what finished first: where the builder's preparation had built the compute pipelines on their own first, they were the ones kept and almost every graphics pipeline was dropped, as in #1551.) The save decides "nothing new" by the cache's size, which the driver held at the cap, so the file never changed. On this driver the game needs about 2.7 GB of pipeline cache.This change gives the start-up more than one pipeline cache where device policy's new
pcache_splitsays: 768 MB on Qualcomm's own driver (VK_DRIVER_ID_QUALCOMM_PROPRIETARY), 0 (one cache, exactly as before) everywhere else, Mesa's Turnip included;RX_VK_PCACHE_SPLIT_MB(a whole number of MB, or0/off) sets it. Once the open cache's data passes that size, what the start-up compiles goes into another cache with its own file,longshot_vk_pipelines_part_<n>.bin(at most 8 more). Before play every cache is asked without compiling, and a pipeline is compiled into the open one only when none has it; in play each is asked as the one cache was. The parts are read at the start, saved by their own sizes, and dropped, swept and rejected with the main file. Result on the Snapdragon: the second start builds its pipelines in 4.2 s instead of 582 s and reaches play in about 51 s instead of about 11 minutes.To see the bug on
main: on a Snapdragon X (Adreno) PC, start the game twice. The second start's log still saysprecompile: ... built into the pipeline cache ... in 5xx sandthe pipeline cache not written: nothing new since it was read or last written (1024.x MB). Without the hardware:python -I -B tests/test_pipeline_play_cache.pyonmainwith this PR's test commit, where the casecapfails (the second start compiles 70 of 120 again).Read first:
pcache_splitingpu/vk/device_policy.h(the rule and its switch),gpu/vk/pcache_split.h(the file names), then the section "The start's caches past pcache" ingpu/vk/vk_draw.cpp(start_create,pcache_parts_read,pcache_parts_drop,pcache_parts_save), and the casescapandcap-offintests/pipeline_play_cache_test.cpp.Fixes #1551. See #2316 (NVIDIA: the same "nothing new" size check is involved there, on another driver; this PR does not change NVIDIA's path).
Testing
Tested: Windows 11 Home ARM64 (build 26300), Snapdragon X Elite X1E80100, Adreno X1-85, driver 31.0.178.0 (
0x8037d000); the game is the x64 build under Windows' emulation. This PR's renderer (dev.py vk) in a copy of a nightly-801 game folder (9046a8d7, this PR's base), headless through the control bridge, two starts on one folder. Start 1, with no pipeline cache: the caches split as intended (pipeline cache: the open one passed the split: ... longshot_vk_pipelines_part_1.bin, then_2,_3; files 770 + 770 + 770 + 390 MB), 43,130 graphics and 4,879 compute pipelines built in 637 s. Start 2:split at 768 MB (RX_VK_PCACHE_SPLIT_MB): 3 parts read beside it, the same pipelines built in 4.2 s (the compute ones 0.5 s), load at create0 in no cache(987 onmain), the title reached about 51 s after launch, the caches not rewritten, and a clean quit.A third start after moving the default into device policy (
c902de64) on the same caches: the policy line logspcache_split=768 MB,split at 768 MB (device policy, RX_VK_PCACHE_SPLIT_MB): 3 parts read beside it, the pipelines in 4.4 s.Checks:
tests/test_pipeline_play_cache.pyfails onmainwith the test commit (cap: start 2 compiled 70 of 120) and passes here (compiled 0 of 120); with the fix's key line removed (pcache_built_into) it fails again. After the review (d779bc6dtest,0d80d684fix): the casespart-missingandpart-cut(a split folder whose part 1 is deleted or cut short) fail onc902de64and pass here: the parts from it on removed, the marker dropped, what they held built again before play; 25 cases in all. Newtests/test_pcache_split.py(the header) passes;tests/test_device_policy.pypasses with the field, six switch cases (0,off,512, empty,lots, NVIDIA900) and a Snapdragon X Elite as its log gives it (26 PCs, 85 environments). The renderer builds whole with llvm-mingw for Windows (0 failed, exports checked). Fulltests/run_all.pyon this PC: 815 passed, 26 failed, 139 skipped on bothmainand this branch, the same 26 failing on both (this PC's setup: test_auto_handheld, test_build_long_paths, test_coverage_run, test_crash_dialog, test_crash_record, test_dev_ab, test_dev_build, test_dev_migrate, test_discover, test_game_menu_mouse_buttons, test_input_movie, test_lift_lookups, test_linux_preflight, test_make_game_cache, test_mise_build, test_mods_list, test_nfc_model_info, test_pads_after_menu, test_perf_report, test_portable_builder_home, test_portable_builder_startup, test_sampler_stack_walk, test_sdiv_overflow, test_shader_module_guard, test_split_giants, test_walk). test_longshot_ctl failed once in the full run under load (stop_methodexitagainstquit) and passed twice alone. The 139 skips are this PC's missing tools (Vulkan headers, spirv-val, Linux-only checks); the checks reading the changed files were also run with the Vulkan headers found: 201 passed, the same 5 failing as onmainplus test_sampler_admission's concurrent case once under load (passes alone, twice; onmaintoo).After the rebase onto
main@fd68f82c(head67695be9), in the game again:dev.py packanddev.py rtover the shared base (be663a08, its 1 GiB pipeline cache as a player's who updates), headless, two starts. Start 1:split at 768 MB (device policy, RX_VK_PCACHE_SPLIT_MB): 0 parts read beside it, the old file past the split, so the pipelines it had lost went into new parts (_part_1to_part_3, 788 + 788 + 150 MB), built in 334.4 s; play 392 s after launch. Start 2:3 parts read beside it,1 play files merged, the start-up's pipelines in 4.2 s (compute 0.5 s), load at create 0 in no cache, play 62 s after launch. Nosubmit failed (-3)in either.Still to test:
pipeline cache: split atline and the same start-up times and logs asmain; the code path is unchanged at a split of 0 (@Beanstalk start twice on Windows NVIDIA, AMD and Intel and compare the start-up's precompile lines with main)vk: submit <n> failed (-3)), onmainas well as here and with the recorder thread off; it is being investigated apart in #2566 (and #2567 makes the renderer treat that-3as a lost device). Three sessions with this PR (play files saved, merged at the next start, all parts read) ended in that freeze within minutesMeasurements
Verdict: on an Adreno X1-85 a warm start reaches play in 55 s instead of 679 s (medians of three interleaved pairs), its start-up pipelines built in 4.2 s instead of 566.8 s; it holds about 1.6 GB more private memory for the larger caches.
Setup: Windows 11 ARM64, Snapdragon X Elite, Adreno X1-85, driver 31.0.178.0, 16 GB; the x64 game under emulation. One nightly-801 game folder copied twice, each starting with no pipeline cache:
mainwith nightly-801's renderer, this PR with0d80d684's. Headless through the control bridge, each start a queue job; ordermaincold, PR cold, then three rounds ofmainwarm and PR warm. The numbers are the logs' own lines; every start is in the comment with the series.9046a8d70d80d684The game-free model (
tests/test_pipeline_play_cache.py, casecap, a cache that keeps 50 pipelines): the second start compiles 70 of 120 onmain, 0 here.The default, 768 MB: under the 1024.5 MB the driver keeps, with room for the pipelines built between two looks at the open cache's size (every 16 builds); the probe measured that adding to a cache slows steadily as it grows (10 s per 100 MB at first, 60 s near 1 GiB), which smaller caches also avoid.
Risks
pcache_splitis 0 andstart_createmakes a pipeline with the one cache as before; the parts code does nothing.RX_VK_PCACHE_SPLIT_MB=0(one cache, as onmain).the driver's shader cache has 0 of 49 noted pipelines asked ... it lost them) runs the warm pass at every start, now 4 s; the 86 mesh-fallback pipelines the driver refuses (could not be made: -13) are tried at every start (most of the remaining 30 s); and a separate freeze at the title (vk: submit <n> failed (-3)).Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.gpu/vk/switches.def.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Windows 11 ARM64, Snapdragon X Elite, Adreno X1-85, driver 31.0.178.0, the x64 game under emulation: this PR's renderer in a copy of a nightly-801 game folder (
9046a8d7), headless through the control bridge, two starts on one folder. Start 1 (no pipeline cache): the caches split into longshot_vk_pipelines.bin + _part_1/_2/_3 (770+770+770+390 MB), 43,130 graphics + 4,879 compute pipelines built in 637 s. Start 2: 'split at 768 MB: 3 parts read beside it', the same pipelines in 4.2 s (582.1 s on main), load at create 0 in no cache (987 on main), the title reached ~51 s after launch (~11 min on main), caches not rewritten, a clean quit.WIP: fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)to fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)to WIP: fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)WIP: fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)to fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)73223f10cfc902de64d3Pushed
c902de64(rewritten as testd8842e37, then fix): the split's default moved into device policy, as docs/dev/standards.md asks of a per-PC default. device_policy.h's pcache_split is 768 MB on Qualcomm's own driver (VK_DRIVER_ID_QUALCOMM_PROPRIETARY) and 0 elsewhere, Mesa's Turnip included, so the Linux Qualcomm item left Still to test; RX_VK_PCACHE_SPLIT_MB is applied there (a whole number of MB, or 0/off). test_device_policy.py gets the field, six switch cases and a Snapdragon X Elite; the play cache model sets the policy's split instead of the switch. The test commit alone still fails (start 2 compiles 70 of 120) and the fix passes (0 of 120). In the game, a third start on the same caches: pcache_split=768 MB in the policy line, 3 parts read, pipelines in 4.4 s.@review
Recommendation: Request changes. The split substantially improves the reported Snapdragon warm start, but recovery from missing parts can leave pipelines absent while the saved marker says they are present.
The change stores startup pipelines in multiple cache files on Qualcomm's proprietary driver and searches them before compiling. The reported warm start falls from 582.1 seconds to 4.2 seconds, at a cost of about 1.4 GB of private memory and 1.7 GB of disk space; recovery and compaction need fixes.
Blocking (1): must change before merging.
PR description / Description follows the template (pull_request_target)fails on this head and passes on the base branch: Failing after 5s.Should fix (2): not blocking, but worth doing before merging.
gpu/vk/vk_draw.cpp:1173: A missing or unreadable part is treated as an ordinary end of the sequence, without invalidating the precompile marker. (more on the line) Do: Detect an incomplete or unreadable part sequence, invalidate the completed marker and handle subsequent parts consistently; add a recovery test with a missing or truncated part.gpu/vk/vk_draw.cpp:1175: Rejected parts are removed with the narrow C file API even though the cache directory is UTF-8. (more on the line) Do: Remove the files through a UTF-8-aware wide-path helper and handle deletion failures.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L1, L2 and L4.Questions (1) (not confirmed from the code; they don't hold the recommendation)
gpu/vk/vk_draw.cpp:1265: Does the affected Qualcomm driver silently discard excess entries when merging pipeline caches, while reporting a successful merge?Checks: Still running: 13 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven by the required repeated comparison, although the reported effect is large: one second-start run on each side measured 582.1 seconds on the base and 4.2 seconds on the PR on an Adreno X1-85. The game-free model also reports 70 repeated compiles on the base and zero here.
Other systems: The default is unsplit on NVIDIA, AMD, Intel and Mesa Turnip, but the shared creation and save paths changed. Windows and Linux Tier 1 runs, Steam Deck coverage, and a long Snapdragon play session remain outstanding.
Switches: RX_VK_PCACHE_SPLIT_MB is added: 768 MB on Qualcomm's proprietary driver and 0 elsewhere; 0 or off disables splitting. The row and reference documentation are present. The Qualcomm default needs repeated measurements and longer play validation; other Qualcomm proprietary devices have not been tested.
Reviewed:
c902de64d3against9046a8d750: Read the repository rules, standards and PR template, the commit messages, the changed cache implementation and surrounding initialization, creation and save paths, the new split header and test, and the relevant test and pack-script diffs. Skimmed the remaining changed test, policy and documentation diffs. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. The large renderer and other changed files were not read in full.; nothing run (a code review).Checked and fine:
Testing: No code, tests or project scripts were run, as requested. The author reports the game-free tests passing and a Snapdragon warm-start run; CI is still running, and the head-only description check is already reported separately.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -1115,0 +1170,4 @@VkPipelineCacheCreateInfo ci{VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO};ci.initialDataSize = part.size(), ci.pInitialData = part.data();if (part.empty() || vkCreatePipelineCache(dev.device, &ci, nullptr, &c) != VK_SUCCESS || !c) {const bool there = part.rejected() || !part.empty();L1 (should fix): A missing or unreadable part is treated as an ordinary end of the sequence, without invalidating the precompile marker.
When: If part 1 is deleted, truncated to 32 bytes or less, or cannot be opened, pcache_file_read returns an empty non-rejected result. The loop stops with pcache_file_rejected still false even if later parts and a completed marker exist, so startup can skip rebuilding pipelines that were in the missing parts and compile them during play.
Do: Detect an incomplete or unreadable part sequence, invalidate the completed marker and handle subsequent parts consistently; add a recovery test with a missing or truncated part.
@ -1115,0 +1172,4 @@if (part.empty() || vkCreatePipelineCache(dev.device, &ci, nullptr, &c) != VK_SUCCESS || !c) {const bool there = part.rejected() || !part.empty();if (part.reset() && there)for (int j = i; j <= pcache_split::kMostParts; j++) remove(pcache_path_at(j).c_str());L2 (should fix): Rejected parts are removed with the narrow C file API even though the cache directory is UTF-8.
When: On Windows, a game folder containing characters outside the active code page can be read through PipelineCacheFile's wide API, but remove can fail to delete its rejected part files. Those files remain and can be encountered again on subsequent starts.
Do: Remove the files through a UTF-8-aware wide-path helper and handle deletion failures.
fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)to WIP: fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)Thanks for the review. Pushed
0d80d684: L1 and L2 fixed, as a test commit (d779bc6d, failing on the previous head) and then the fix. Point by point:L4 (blocking), the description check. It fails because the PR was marked ready while one When it applies box is still unticked: Host code builds on Windows (llvm-mingw) and Linux. That check gates the rest of CI (every other job shows Blocked by required conditions), so the Linux build that would settle the box can't run. I've put the PR back to WIP so the check passes and CI runs; once the Linux build is green I'll tick the box and mark it ready again.
L1, a missing or unreadable part: fixed. Confirmed:
PipelineCacheFile::readgives no data, without rejecting, for a file that's missing or too short for its header, so a deleted or truncated part 1 was taken for the end of the parts, the later parts stayed unread, and the marker stayed. Now (pcache_parts_read):pcache_parts_drop);pcache_file_rejectedis set, soprecompile_rundrops the marker and builds them again before play, as for the main file.Test: the play cache model's fake reader now answers as the real one does (missing or short: no data, not rejected; another driver's header: rejected), and two new cases make a split folder with a start of
cap, then delete or truncate part 1 and start again: the parts must be gone, the marker dropped, and the 88 pipelines they held built again. Both fail onc902de64(pcache_file_rejectedstays false) and pass here; with the fix's existence check removed they fail again. All 25 cases pass.On Qualcomm today this was masked: the driver-cache sample (
the driver's shader cache has 0 of 49 noted pipelines asked ... it lost them) drops the marker at every start, since that driver seems to keep no cache of its own. It would have mattered once that sample is fixed, so it's worth having right.L2, narrow
remove(): changed, though it wasn't failing in the game.longshot.exe's manifest sets the process's active code page to UTF-8 (nx2/win_manifest.py), which makes the C runtime's narrow file functions take UTF-8 in the whole process,longshot_vk.dllincluded; the play-file code beside it usesremove()the same way. For consistency withpcache_stamp.h, the parts now go throughstd::filesystem::remove, and a removal that fails is logged.Question: does the driver drop entries silently on a merge? Not measured directly: the probe measured creation, where the driver drops silently past 1024.5 MB. The merges here don't go near that:
play_files_mergemerges into the open cache (pcache_at(open)), which is under the 768 MB split by construction, and the play files are KB to a few MB each (9 KB in the runs above). The split leaves about 256 MB of room under the cap for that and for the builds between two looks at the size. I can add a merge-at-the-cap step to the probe if you'd like it pinned down.L3, testing. Agreed. The plan:
mainand this PR, warm starts three times each and one more cold start each, recording the start-up's times and private memory from the logs. I'll post the table here.The change doesn't alter the path other drivers take (
pcache_splitis 0 there andstart_createmakes a pipeline with the one cache, as before), but the Test Farm runs are what should show that.L3: the repeated start-up comparison,
mainagainst this PR, interleaved on the Snapdragon.Setup: Windows 11 ARM64, Snapdragon X Elite, Adreno X1-85, driver 31.0.178.0, 16 GB; the x64 game under emulation. One nightly-801 game folder (
9046a8d7) copied twice, each starting with no pipeline cache:mainwith nightly-801's own renderer, this PR with0d80d684's (dev.py vk). Headless through the control bridge, each start a queue job, the title for 20 s, then a quit. Order:maincold, PR cold, thenmainand PR warm, three rounds. The numbers are the logs' own lines; launch to play is from the start towhat play makes goes into play files.Medians of the three warm starts:
9046a8d70d80d684submit failed (-3)in any of the eight starts.A correction to how the description puts the cause. On
main's cold start here, the save during the build wrote the cache at the cap (pipeline cache saved (1048885 KB)) while compute pipelines were still being built: the 12 workers take the pipelines in the queue's order (compute, then the mesh fallback's, then graphics), but what fills the first 1024.5 MB is what finishes first, and the slowest compute pipelines (up to 29 s each) finish after it. So onmainevery warm start here still builds its compute pipelines (131-147 s) and most of the graphics ones; it is ~200 s faster than the cold start because about 1 GiB of the 2.7 GB comes back. In #1551's report and my first run the compute ones had hit (their folders' caches had been started by the builder's preparation, which builds the compute pipelines on their own first). The cause is the same either way: the driver keeps the first 1024.5 MB it is given and drops the rest. I'll correct the description's wording.Still to come: a long play session on the Snapdragon by hand, and the Tier 1 runs through the Test Farm.
@review
Recommendation: Approve. The code is ready: only testing is left. The repeated Snapdragon comparison shows a substantial warm-start improvement, but the long-play and affected-platform runs remain outstanding. Recommend approval; not approved on the forge.
The change splits Qualcomm pipeline caches so pipelines discarded by the driver can be retained across starts. It greatly reduces warm-start time on the tested Snapdragon, at a cost of about 1.6 GB of private memory and larger cache files.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
Since the last review (on
c902de64d3)Resolved: L1 (A missing or unreadable part is treated as an ordinary end of the sequence, without invali…); L2 (Rejected parts are removed with the narrow C file API even though the cache directory is U…); L4 (The check
PR description / Description follows the template (pull_request_target)fails…)Still open: L3 (The long play session and affected-platform checks remain open.)
Checks: Still running: 13 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. Three interleaved warm runs on the reported Snapdragon X Elite reduced median launch-to-play time from 679 s to 55 s and pipeline-building time from 566.8 s to 4.2 s. Median private memory at the title rose from 9,182 MB to 10,815 MB.
Other systems: Qualcomm's proprietary driver splits by default; other drivers, including Turnip, default to one cache. Windows and Linux runs on other GPU vendors, Steam Deck coverage, and a long Snapdragon play session remain outstanding.
Switches: RX_VK_PCACHE_SPLIT_MB sets the split size or disables splitting with 0/off. Its device-policy default is 768 MB on Qualcomm's proprietary driver and 0 elsewhere; the tested Qualcomm default leaves room below the reported driver cap.
Reviewed:
0d80d68435against9046a8d750: Read the changes sincec902de64, the affected cache-loading and marker references, repository rules and pull request template; skimmed the full pull request diff and reported runs. The full changed code files and all dependent code were not read in full; docs/review-checklist.md was absent.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run during this review. The author reports Windows ARM64 game runs, game-free tests and a Windows renderer build; Linux build and hardware runs remain pending. CI is still running.
Overlaps and merge order: Not checked; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@llun thanks for asking for the second review: BeanBot now recommends approval, with only testing left.
Two things this PR needs from a maintainer:
0d80d684(a first-time contributor's fork, I think). The Host code builds on ... Linux box is waiting for that run; once it is green I'll tick it and mark this ready.main. On those driverspcache_splitis 0 and the creation path is the one cache's, as before.The long Snapdragon session is blocked by a separate problem, now noted in #2566: on this PC the game freezes on scene changes (a GPU timeout, LiveKernelEvent 141, then
submit failed (-3)), onmaintoo.Still to test: the long Snapdragon session's blocker now links its issue, #2566 (the GPU timeouts on scene changes), and #2567 (the renderer treating the driver's -3 after a GPU reset as a lost device).
0d80d6843567695be98bRebased onto main @
fd68f82c(19 commits past the old base, the Rust builder and the game/ refactor among them): no conflicts, and the four commits' own changes are unchanged (git range-diff: only a context line moved, main's own rename of host/game_layout.c in a comment beside packs.py). Head67695be9. On it: every check reading the changed files passes (pipeline_play_cache, device_policy, pcache_split, pcache_stamp, switch_table, dev_packs, pipeline_cache_file, compute_gate, compute_pin); the 6 that fail (test_dev_ab, test_dev_build, test_input_movie, test_precompile_compute_guard, test_sampler_admission, test_shader_module_guard) fail on this main on this PC too. The renderer builds whole on it with the new builder (dev.py vk, llvm-mingw, exports checked). The measurements were taken on0d80d684, whose code this head carries unchanged: they still hold. CI on the new head still waits for a maintainer's approval.The rebased head
67695be9ran in the game on the current main (dev.py pack and rt over the shared basebe663a08, whose 1 GiB pipeline cache is what a player who updates has). Start 1: the old file was past the split, so what it had lost went into three new parts (788 + 788 + 150 MB), built in 334.4 s, play at 392 s. Start 2: 3 parts read, 1 play file merged, the start-up's pipelines in 4.2 s, load at create 0 in no cache, play at 62 s. No submit failed (-3) in either. Added to Testing.@llun could you approve the CI run for this PR? Every job except the description check has been "Blocked by required conditions" since it opened (my fork's first PR, so I think the workflows need a maintainer's approval). The last unticked box, "Host code builds on Windows and Linux", is waiting on CI's Linux build; the Windows renderer builds and runs here. Once it's green I'll tick the box and mark this ready.
If a Tier 1 run would help too: @Beanstalk start the game twice on Windows NVIDIA, Windows AMD and Linux, and compare the start-up's precompile and pipeline-cache log lines with main (they should be the same: the split is off on every driver but Qualcomm's).
@windowsarmwrestler only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it or to this comment.WIP: fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)to fix(vk): Qualcomm's driver keeps 1 GiB of a pipeline cache: the start-up's pipelines go into several (RX_VK_PCACHE_SPLIT_MB)@Beanstalk
Beanstalk test farm · 🔄 testing (10 of 7 reports so far)
Commit
67695be· approved by llun (reviewed) · dashboard⚠️ Note: The Qualcomm target requires a volunteer with the qualcomm tag; the farm cannot guarantee the specific reported Adreno driver or reproduce its cache cap on other GPUs.
⚠️ Note: The plan does not force cache splitting or corrupt cache parts, and it cannot verify the reported long Snapdragon play session or the exact consecutive-start cache-file contents.
⚠️ Note: Warm-driver cache control is Linux-only; Windows uses the normal-cache scenario, and precompile/cache log lines are available in results but are not compared line by line.
Started at 2026-11-28 04:22 UTC.
⚠ No tester has a PC for
windows+qualcomm(none seen in 14 days): it waits until one signs in.windows+nvidiawindows+amdwindows+intelwindows+qualcommlinux+nvidialinux+radvsteamdeckCouldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.
windows+nvidia, report 1:main's longshot-builder failed (exit 1): could not compile 'crc32fast' (build script) due to 1 previous errorwindows+nvidia, report 2:main's longshot-builder failed (exit 1): could not compile 'proc-macro2' (build script) due to 1 previous errorwindows+amd, report 1:main's longshot-builder failed (exit 1): could not compile 'quote' (build script) due to 1 previous errorwindows+amd, report 2:main's longshot-builder failed (exit 1): could not compile 'proc-macro2' (build script) due to 1 previous errorwindows+intel, report 1:main's longshot-builder failed (exit 1): could not compile 'proc-macro2' (build script) due to 1 previous errorlinux+radv, report 1:the main base failed (exit 1): The game's Rust (longshot-rs) has no prebuilt library for these sources (c60d8f80f5d1), and nothing here to build it with: in a checkout, install Rust (mise install) or set LONGSHOT_CARGO; a release's tree carlinux+radv, report 2:the main base failed (exit 1): The game's Rust (longshot-rs) has no prebuilt library for these sources (c60d8f80f5d1), and nothing here to build it with: in a checkout, install Rust (mise install) or set LONGSHOT_CARGO; a release's tree carsteamdeck, report 2:main's longshot-builder failed (exit 1): Traceback (most recent call last):What was tested
What will be tested · AI plan (
gpt-6.1-terra)The plan compares startup pipeline preparation and cache behavior against main on Windows NVIDIA, AMD, Intel and Qualcomm hardware, Linux NVIDIA and RADV, and Steam Deck. Each side gets two starts in a normal-cache scenario and, on Linux, two with a warmed driver cache; gameplay then visits Hyrule Field and Market for 20 seconds each. It measures startup, pipeline preparation, frame times and pictures; crashes, substantial startup or frame-time regressions, or large picture differences fail the plan. The Qualcomm and Steam Deck targets have no matching testers shown online and will wait for them. No tester online now matches windows+qualcomm, linux+nvidia, steamdeck: those targets wait for one.
kokiri-start, then teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 10 s warm-up), teleport to Market, take the picture market to compare with main, measure market for 20 s (after 10 s warm-up); 2 runs on each side.kokiri-start(each side's driver shader cache kept across its starts, filled first by an unmeasured start, Linux only for now), then teleport to Hyrule Field, take the picture warm-field to compare with main, measure field for 20 s (after 10 s warm-up); 2 runs on each side.Measurements on `windows+nvidia`, for the PR description
Verdict: could not be judged on windows+nvidia (2 reports).
Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu+xessNVIDIA GeForce GTX 980, 582.78.0Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAMScene: normal-cache, from the repository's save kokiri-start; warm-driver, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); normal-cache: 2 game starts a side, field 20 s after 10 s warm-up, market 20 s after 10 s warm-up; warm-driver: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `windows+amd`, for the PR description
Verdict: could not be judged on windows+amd (2 reports).
Hardware: 1: windows+amd+amd-proprietary+igpu+xess
AMD Radeon(TM) Graphics, 2.0.279AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM; 2: windows+amd+amd-proprietary+dgpu+xessAMD Radeon RX 6700 XT, 2.0.353AMD Ryzen 7 2700X Eight-Core Processor, 16 GB RAMScene: normal-cache, from the repository's save kokiri-start; warm-driver, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); normal-cache: 2 game starts a side, field 20 s after 10 s warm-up, market 20 s after 10 s warm-up; warm-driver: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `windows+intel`, for the PR description
Verdict: queued on windows+intel (1 report).
Hardware: 1: windows+intel+intel-proprietary+igpu
Intel(R) UHD Graphics 630, 0.404.2115Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAMScene: normal-cache, from the repository's save kokiri-start; warm-driver, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); normal-cache: 2 game starts a side, field 20 s after 10 s warm-up, market 20 s after 10 s warm-up; warm-driver: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `linux+nvidia`, for the PR description
Verdict: pass on linux+nvidia (1 report): no rule failed and no PR run crashed.
Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 5070, 620.73.4AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMScene: normal-cache, from the repository's save kokiri-start; warm-driver, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); normal-cache: 2 game starts a side, field 20 s after 10 s warm-up, market 20 s after 10 s warm-up; warm-driver: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)fd68f8267695beFlags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `linux+radv`, for the PR description
Verdict: could not be judged on linux+radv (2 reports).
Hardware: 1: linux+amd+radv+igpu
AMD Radeon 8060S Graphics (RADV STRIX_HALO), 26.99.99AMD RYZEN AI MAX+ 395 w/ Radeon 8060S, 64 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMScene: normal-cache, from the repository's save kokiri-start; warm-driver, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); normal-cache: 2 game starts a side, field 20 s after 10 s warm-up, market 20 s after 10 s warm-up; warm-driver: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `steamdeck`, for the PR description
Verdict: pass on steamdeck (2 reports): no rule failed and no PR run crashed.
Hardware: 1: linux+amd+radv+igpu+handheld
AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAM; 2: linux+amd+radv+igpu+handheldAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMScene: normal-cache, from the repository's save kokiri-start; warm-driver, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); normal-cache: 2 game starts a side, field 20 s after 10 s warm-up, market 20 s after 10 s warm-up; warm-driver: 2 game starts a side, field 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)fd68f8267695beFlags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
The testers' hardware
windows+nvidiaNVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMwindows+nvidiaNVIDIA GeForce GTX 980, 582.78.0Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAMwindows+amdAMD Radeon(TM) Graphics, 2.0.279AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAMwindows+amdAMD Radeon RX 6700 XT, 2.0.353AMD Ryzen 7 2700X Eight-Core Processor, 16 GB RAMwindows+intelIntel(R) UHD Graphics 630, 0.404.2115Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAMlinux+nvidiaNVIDIA GeForce RTX 5070, 620.73.4AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMlinux+radvAMD Radeon 8060S Graphics (RADV STRIX_HALO), 26.99.99AMD RYZEN AI MAX+ 395 w/ Radeon 8060S, 64 GB RAMlinux+radvAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMsteamdeckAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMsteamdeckAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMRun by hand on PCs that don't match their target (not counted)
AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8)Recommendation: Request changes. The Snapdragon warm-start gain is substantial. The split caches need reliable completion and recovery before merge.
The measured Snapdragon pair cut median warm launch-to-play from 679 s to 55 s, with about 1.6 GB more private memory. The reviewed head retest reached play in 62 s on a warm start after importing the old cache. Those runs predate current main. The branch conflicts with the device policy and its fixture. Linux NVIDIA and Deck Farm runs passed. Desktop RADV and Windows cross-vendor attempts could not build their baselines, and a Radeon 760M run had one PR hang and +34.5% Field p99 on its usable sample. Rerun that case before attributing it. Sustained Snapdragon play is still blocked by #2566, which also reproduces on main. Measurements · Head retest · Farm
Reviewed
67695be98b325841d92427f08b5bb5a86608c1c9against actual merge basefd68f82c1d78ae5f19c90fb65ab20c11a82a1475. Current target is01d6878b. Description check fails and the regular CI jobs remain blocked.@ -1115,0 +1192,4 @@VkPipelineCache c = VK_NULL_HANDLE;VkPipelineCacheCreateInfo ci{VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO};ci.initialDataSize = part.size(), ci.pInitialData = part.data();if (part.empty() || vkCreatePipelineCache(dev.device, &ci, nullptr, &c) != VK_SUCCESS || !c) {[P2] Preserve valid split files on a temporary read or Vulkan creation failure. The fallback currently removes this part and later parts. Distinguish temporary unavailability from confirmed corruption.
@ -13273,2 +13436,4 @@}}// (longshot) and the start's caches past it, each to its own file (pcache_parts_save, pcache_split.h)if (pcache_parts_save(wait_ms, queue) && pcache_save_outcome.what != Outcome::kWritten)[P2] Require all nonempty split parts and the main cache to persist before reporting a completed save. A failed final-part write can be masked by other successes and later look like an ordinary end of parts. Record and verify the expected parts.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.