Repository navigation
fix(agc): read the pipeline cache header through the long-path form on Windows - #8554
oneandonlydean merged 2 commits into
Conversation
…n Windows PipelineCache::readHeader opened the cache file with a plain path while readFile and the writer already use NativeCachePath_nid_no_patch. Past MAX_PATH the header read failed, so every save saw the file as changed and merged it again (boykopovar#7452). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th form When the full read fails, readFile asked std::filesystem::exists with the plain path, so on Windows a cache file past MAX_PATH was reported missing instead of unreadable and could be saved over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current-main integration follow-up, 2026-10-21 UTC#8554 is merged as The old fixture first failed because it expected a cache file directly under the configured root; that failure is retained. After the fixture correction, Scope: experimental integration AI-assisted: yes (Codex); author responsible. Original regression offer and historical controls@aarushkha there is an existing focused regression for the header half that you can reuse: The recorded test-only control failed 3/3 on RTX 5080 and 3/3 on Radeon Graphics; the corrected old composition passed on both with Khronos validation. Those results are pinned to main I will not open a competing header-reader PR. Please preserve original authorship if you take the fixture; your existence-check correction remains your separate contribution. AI-assisted: yes (Codex); author responsible. |
|
Follow-up regression coverage is in #9013, Current baseline passes both existing cache cases; candidate passes all 3 (Windows 11, RTX 3050 Laptop/617.42, GCC 15.2.0-r7), no skips, missing validation layer or VUIDs. Independent header/existence controls on |
What
PipelineCache::readHeaderopened the cache file with a plainstd::ifstream(path).readFile(throughShaderRecompiler::ReadWholeFile) and the atomic writer already resolve the path withNativeCachePath_nid_no_patch. On Windows, past MAX_PATH, the header read fails while the full read and write succeed.savethen compares a missing on-disk header withsettledFile, treats the file as changed, and re-reads and merges it on every save. This is the remaining header reader confirmed in #7452.On Windows the header is now read through the extended path, as
PipelineJournaldoes for its directory. If the path cannot be resolved, it returnsstd::nullopt, matching a failed open.readFilehad the same gap in its fallback: when the full read fails it callsstd::filesystem::existsto tell a missing file from an unreadable one, and used the plain path. Past MAX_PATH an existing file was reported missing instead of unreadable, sosavecould write over it. It now checks the extended path too. This was listed in the review of #7462 and is not part of #7933 or open #7945. Linux and macOS are unchanged.Tested
Windows 10 Pro (10.0.19045), WinLibs GCC 15.2.0 posix UCRT r7, Release, full build with
-DBUILD_TESTING=ON, NVIDIA GeForce RTX 3060 (driver 617.42). Both commits applied tomain83751168dd(they cherry-pick cleanly; this branch's own base is older).PipelineCache.cppcompiles with no warnings.ctest --test-dir build -R "^agc_pipeline_cache(_file)?$"withANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1:agc_pipeline_cacheagc_pipeline_cache_filemain83751168ddmain+ this PRThese tests write the cache under a short temporary path, so they check that the change does not break the ordinary path. They do not exercise a path past MAX_PATH. I tried that by pointing
TEMPat a 196-character directory, so the cache file lands past MAX_PATH. Onmain,agc_pipeline_cache_filethen hangs rather than failing. That matches the housekeeping hang on long extended roots that #7945 addresses, so this PR's long-path behaviour could not be measured that way, and no long-path regression is added here.Not run: the Khronos validation layer (
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation), because no Vulkan SDK is installed on this machine; Linux; a title.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)PipelineCache::readHeadergap from Windows shader and pipeline caches cannot persist under long host paths (PPSA99902) #7452)🤖 Generated with Claude Code