mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #2062] d3d12: say when the driver's pipeline cache stops keeping new pipelines (RT-PIPELINE-CACHE-GROWTH-STALL) #2066
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2066
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2062
Author: @thegalaxydev
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:rt-pipeline-cache-growth-stall📝 Commits (2)
e6f34edd3d12: say when the driver's pipeline cache stops keeping new pipelines (RT-PIPELINE-CACHE-GROWTH-STALL)869319bdocs: rewrap the pipeline cache growth paragraph (RT-PIPELINE-CACHE-GROWTH-STALL)📊 Changes
5 files changed (+140 additions, -4 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+10 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+37 -0)📝
runtime/src/pipeline_cache_store.h(+38 -0)📝
runtime/src/pipeline_profile.h(+13 -3)📝
runtime/test/pipeline_cache_store_test.cpp(+42 -1)📄 Description
RT-PIPELINE-CACHE-GROWTH-STALL, claimed in #1608 after the finding just above it.
What
The runtime says once, in the log, when the title's pipeline builds keep compiling but the driver's
VkPipelineCachehas stopped growing (the numbers below show the format, not a run):pipeline_profile::DriverCall(it already wraps both titlevkCreate*Pipelinescalls) always times the call and counts successful builds of at least 200 ms incompiled_builds(). A cache hit takes a few milliseconds, also while the title loads every core. Printing still needsLEONIDA_PSO_PROFILE=1.pipeline_cache_store::GrowthWatch(pure, no Vulkan) compares two cache sizes with the builds that compiled between them: 16 or more compiled and less than 64 KiB of growth reports once.LEONIDA_PIPELINE_CACHE_BYTES. The size query is the one the save already makes.docs/d3d12_vulkan.mdrecords the measurements under "Pipeline caches".Why
A driver can stop adding to a large cache without an error, and then a session file stops helping without anything saying so. Measured on an RTX 5060 Ti, NVIDIA 610.88, Windows 11 23H2:
vk_pipeline_checknamedgta6rt.exe)__GL_SHADER_DISK_CACHE=0In the game (main
fe1553456+ #1886): seeded with the 1.23 GB file, 68 of the ~110 builds over 200 ms in one run were over 200 ms again in the next; started with no seed, 5 of 164 were. An older cache of mostly main-set graphics pipelines stopped growing at 4.9 GB, so there is no fixed size to test against, hence a growth check instead of a size limit. #1886 measured a 1,285 MB session on an RTX 5080, still growing.Tested
scripts/build_runtime.ps1.pipeline_cache_store_testgainstest_growth(no Vulkan, no GPU): no reference at creation, a growing cache at any size, too few builds, report once, counting from the previous save, a count that went backwards.ctest -R "pipeline_cache|compile_teardown|pipeline_workers|pso_profile|d3d12_pipeline": 10/10 pass.ctest -j 8: everything passes exceptroot_sig,d3d12_state_sweepandd3d12_pso_validation, which fail the same way on mainfe1553456without this change on this machine.scripts/check_no_game_data.pyon the changed files: clean.Related: #1886 (raises the save limit, so sessions reach this size), #1756 (checkpoint scheduling; both touch
save_session_pipeline_cache, the overlap is one added line).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.