Windows: #3158's host-import spans make agc_driver_dcc_keys_first_write fail on main (shared alias refused); fix branch ready #3320
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Silverash-i8 on 2026-10-11T07:25:05Z.
#3158 (host-import spans) was merged with its original head, and on Windows it makes
agc_driver_dcc_keys_first_writefail onmain, as I reported on the PR before it landed. Onmain010fad31, RTX 5060 Laptop, Windows 11, WinLibs GCC 15.2.0 r7, Release, 3/3:It passes on
mainbefore #3158. On Linux the test already fails for another reason (#2767, #3179), so this didn't show there.Cause. An import now covers the whole run of address-adjacent registered ranges. On Windows, a shared mapping in that run needs a read-write alias (
GuestArenaMapAlias_nid_postfixinimportAllocation), andWindowsMappings::MapAliasrefuses one unless the range is a single contiguous run of views of one section at consecutive offsets. Ranges that are adjacent in guest address can still be separate views, so the span's alias is refused and the exception escapesimportAllocation. Before #3158 each range was imported on its own and its alias was fine.Fix:
fix/host-import-span-windows-alias, commitaa653ec5onmain010fad31(nine lines added inGuestBufferMemory.cpp, one sentence in TechnicalDebt):HostImports::unaliasedSpans, andimportRunreturns just the containing range for that span from then on, so the import,runCoversand the refresh check all agree. The import is retried for that range.Tested on Windows 11, RTX 5060 Laptop:
agc_driver_dcc_keys_first_writepasses 3/3 (fails 3/3 onmain),agc_driver_graphics(with #3158'simportCrossingTests/importSpanTests),agc_driver_bda_deviceandagc_driver_bda_span_readspass, and allagc_*tests pass, 351/351.tools/check_conventions.py --base upstream/mainpasses. I haven't rerun the Arrow Lake iGPU, which is in a bad driver state after a run of watchdog resets (#2832, #3171). The existingdcc_keys_first_writecase covers this on Windows, so I didn't add a new test.cc @XairRrR
AI-assisted (Claude Code); I ran everything above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T07:40:04Z.
Reproduced on a second machine (Windows 11, RTX 4070 Laptop, driver 616.92,
mainb6f649d9):agc_driver_dcc_keys_first_writefails with the same alias message. With your commit it passes 3/3, and the wholeagc_*/shader/VideoOut set passes 366/366. I've carried it as #3324 with your commit unchanged.