startup: leave a cache listing with no entries to the disk #3438
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3438
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3436"
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?
@JohnConnorNPC on GitHub · 2026-11-29 08:35 UTC · original
JohnConnorNPC:startup/cache-index-empty-root→main· +9 −6 · 2 files · 1 commits · merged 2026-11-29 09:47 UTCFollow-up to #3435, which was merged before I could push this commit to its branch.
Change
src/startup_stubs/cache_index.h: drop the line that treated anERROR_FILE_NOT_FOUNDfromFindFirstFileExWas an empty listing.FindFirstFileExWon"<directory>\*"returns.and..for an empty directory, so that error only comes from a directory with no entry at all, such as an empty volume root. No test reached that branch: with the line removed,startup_cache_index_checkstill printed0 failed, (f) included, under Wine. Without the branch, every listing failure leaves the index unknown, and those lookups use the disk, as the stand-in did before #3435.FindFirstFileExWfailure state that fallback: an empty directory lists empty through its.and..entries, and a directory with no entry at all uses the disk.tests/startup_cache_index_check.cpp: fix the (a) count in the header comment, 514 → 515 (512 + 3). The ctest regex and the check's own output already say 515.There is no behaviour change for a directory that lists, and no test changes beyond the comment.
Tests
I don't have MSVC or a Windows machine. I built with clang-cl 19.1.7 and lld-link against the xwin SDK, and ran the same executables and arguments that those ctest entries register, under Proton Experimental (wine-11.0) with vkd3d-proton 3.2.0. Commit
628ff356, on main70813f02.startup_cache_indexstartup_cache_index_check: 0 failed; (f) printsmissing directory: listing error 3, lookups unknownstartup_cache_index_per_call_controlFAIL: (a) 515 disk probes for 515 lookups of missing profiles, expected 0, noFAIL: (b)–(h)native_fixed_mesh57{,_mrt,_varying,_uint_heap,_pixel_heap,_waterfall,_waterfall_fine,_buffers,_constant,_mask}_hardwarenative fixed mesh profile lookups 66, opens 2 (2 profiles, 2000 other cache files)native_fixed_mesh57*_warpbidi_controls_check.pyChecked 2600 tracked source, script and build/CI files: no bidirectional controls.Hardware variants: NVIDIA GeForce RTX 4070 Ti SUPER, driver 550.163.01, Debian Linux 6.12 host (no Windows build). The fixture calls
EnableDebugLayer(), but vkd3d-proton does not provide the Windows debug layer's validation.Caveat: these are Wine results only. The
ERROR_FILE_NOT_FOUNDcase itself is not covered by a test, here or on Windows; this change only removes the code that handled it differently. The review on #3435 included a Windows run of these tests atadf532c5(WARP, MSVC 14.44: 12/22 passed, the 10*_hardwarevariants skipped). Nobody has run them on Windows at this commit yet.Refs #3435
AI-assisted
@Leyukaka on GitHub · 2026-11-29 08:51 UTC · original · reviewed
Reviewed
628ff356by reading the diff; nothing was built or run. The change reads correct.FindFirstFileExWfailure withERROR_FILE_NOT_FOUNDwas turned into success (main, src/startup_stubs/cache_index.h:163): solisted_.seal()ran on an empty set,ready_became true, and every lookup in that directory answeredabsent, which skips the open at native_mesh57.inl:256-257. At628ff356the error is kept (cache_index.h:163-166), so lines 183-189 clear the set, store it inlisting_error_and leaveready_false, and line 103 answersunknown: which goes on to the open.same_directoryare untouched, so separators, case and wide characters are handled as before.listing_error()is the log line at d3d12_draw.inl:283.absent, the missing directory isunknownwith a non-zero error. With the line removed, the first half passes only if listing an empty subdirectory succeeds, through.and... No test reaches theERROR_FILE_NOT_FOUNDcase.ctest --preset pr(windows.yml:489-493), and theprfilter (CMakePresets.json:51) does not matchstartup_cache_index*. A Windows run ofctest --preset dev -R '^startup_cache_index'at628ff356would confirm (f).