Repository navigation
perf(shader): keep specialized modules in the shader disk cache - #6954
alfalfa-star wants to merge 1 commit into
Conversation
A specialized module (the SPIR-V a compiled shader becomes for one set of specialization classes and constants) was rebuilt on every run, even when the shader itself came from the disk cache. Specialized modules are now stored in the cache's versioned entry directory under modules/, keyed by a hash of the artifact's SPIR-V, stencil references, classes, constants and target, and loaded from there on later runs. APS5_NO_MODULE_CACHE=1 turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing as a duplicate of #6924 by @moong15, opened two hours before this one. Both store the modules AI-assisted: yes (Claude Code) |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
The shader disk cache keeps compiled shaders and resource plans, but not the specialized modules built from them (the SPIR-V for one set of specialization classes and constants). Every run rebuilds all of them, even when every shader comes from the cache. In Kena: Bridge of Spirits (PPSA01802) this rebuild work repeats on every start and whenever a new area loads.
Specialized modules are stored in the cache's versioned entry directory under
modules/, keyed by a hash of the artifact's SPIR-V, stencil references, specialization classes, constants and target (Vulkan/SPIR-V version, image-offset support), and loaded from there on later runs. Writes go through a temporary file and a rename, so a crashed run leaves no partial entry. Because the entry directory is per source version, a recompiler change never reuses old modules.APS5_NO_MODULE_CACHE=1turns it off.Tested
AMD Radeon RX 9070 XT (RADV GFX1201), Mesa 26.2.4, Arch Linux (kernel 7.2.9), Kena: Bridge of Spirits (PPSA01802).
agc_driver_tessellationsegfaults on main without this change;guest_kernel_fcntlis flaky under parallel load and passes on rerun).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code