Repository navigation
fix(shader): discover prebuilt caches through native Windows paths - #8580
Merged
oneandonlydean merged 2 commits intoOct 20, 2026
Merged
oneandonlydean merged 2 commits into
oneandonlydean merged 2 commits into
Conversation
|
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.
|
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On the supported WinLibs toolchain, prebuilt shader caches can be missed under long Windows paths. An extended-length directory can also be enumerated as the process working directory: with
a.packandz.packin the cache but onlyz.packin the working directory, discovery misses the pack containing the requested key.Normalize candidates through the existing native cache-path helper before file/directory checks, and enumerate Windows directories with
FindFirstFileW/FindNextFileW, closing the search handle through RAII. Preserve pack ordering, loose entries, direct pack-file inputs, and the versioned-directory fallback even when enumeration fails. Linux keeps its existing directory iterator.Add isolated subprocess regressions for packed, loose, versioned, direct-file, empty and missing prebuilt inputs. Each run checks that both the cache input and a canary directory outside it remain byte-for-byte unchanged. Stop the cache writer before constructing the store so these tests exercise discovery and loading independently of housekeeping.
Partial follow-up for #7452. The housekeeping guard in #7945 and PipelineCache header reader in #8554 are separate changes; this PR does not depend on either.
Tested
Release builds with bundled dependencies: Windows 11 Pro 26100 / WinLibs GCC 15.2, and Ubuntu 24.04 WSL / GCC 13.3. Built
agc_shader_disk_cache_tests,shader_cache_file_read_testsandagc_driver_pipeline_journal_testson both systems.Baseline production code: main
2fee39f1b, with only the test harness applied atb97b122f6. Fixed revision:2190ccd20. Every registered test below ran three times, serially, with verbose CTest output and no skips:Windows discovery modes: plain, relative,
\\?\,\\?\with forward slashes,\\.\, ordinary long paths, and extended long paths; every root contains non-ASCII characters. The last two long-path modes exceed 270 characters. Baseline failures are the ordinary long, extended long and extended-forward modes, each failing three times withprebuilt discovery returned the wrong result for pack; all pass after the fix. Linux covers plain, relative and long Unicode paths. Each mode tests all six layouts in separate seed/load processes with a five-second child timeout.Existing tests on both revisions:
agc_shader_disk_cache,shader_cache_file_read,shader_cache_native_paths, and Windowsagc_shader_disk_cache_long_paths. Vulkan coverage on both revisions and both devices:GPU runs used
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. The loader confirms the Khronos validation layer is inserted. Comparing baseline/fixed logs: zeroVUID-entries and zero validation warnings/errors on either system; neither log reports a requested validation layer missing. The CPU discovery fixtures explicitly enable their isolated cache while keeping its writer stopped.check_conventions.py --base origin/mainpassed. Ranpr_overlap.py --branch codex/windows-prebuilt-cache-discovery; its unresolved comparisons concern conflicted legacy PRs sharing these files. Comparing each listed head against its merge-base found no changes todiscoverPrebuiltor additions/removals mentioning the relevant prebuilt/native-path discovery code or these test modes. A merge-tree check with #7945 is clean, as is the merge with mainae12a951f.No retail game, full CTest suite, SMB share, or long device-namespace alias was tested. No performance claim.
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)