fix(shader): share delete access when reading cache entries on Windows #5552
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5552"
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?
Imported from boykopovar/AnyPS5. Originally posted by Sam-mon7 on 2026-10-13T23:42:46Z.
What
WriteFileAtomicallyrenames its open handle over the published cache entry and closes it afterwards. A reader that opens the entry in that window getsERROR_SHARING_VIOLATION, becausestd::ifstreamdoes not share delete access, and the cache reports the entry as gone (the entry holding a prepared shader's SPIR-V is gone).ReadWholeFilenow reads through oneCreateFileWhandle that shares read, write and delete, so a replacement can't switch files mid-read.Tested
Windows 11, RTX 4070, MinGW GCC 15.2 Release, on
main7a0c838ca.agc_shader_disk_cache: holds the published entry open for DELETE, as the writer does, and reads it. It fails onmain(cache reader failed while the published entry retained its rename handle) and passes with this change, 5/5 runs.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
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T03:23:02Z.
Windows test of #5552: Windows 10 (19045), MinGW-w64 GCC 15.2, Release,
ninja -j 4, ctest called directly; the ctest logs contain noSelected GPUline. Tree:main016db923a+ merge of PR headaf2b86928122695ee4664890cfb9c4fa10a737d2(local merge3dbd70e58, no conflict). Logs:rtx5552_*_N.log,rtx5552_result.txt.1 ctest targets, 3 runs each, exit code 0 in 3 of 3 runs:
agc_shader_disk_cache.Not tested: that the new or changed tests fail without the change (no baseline run), other ctest targets, the AMD GPU unless named above, Linux, a title run.
AI-assisted (Claude Code).