fix(agc): report guest addresses above the user address space as unmapped on Windows #5479
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5479"
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 ymatrix1 on 2026-10-13T20:52:34Z.
What
A title can hand the GPU a buffer or descriptor V# based at an address above the Windows user-mode address space. Kena: Bridge of Spirits (PPSA01746) bases a read-only V# at
0xf00000000000.VirtualQueryfails for any address abovelpMaximumApplicationAddress, sodescribePagesreturned "not queried" and the driver aborted withAGC driver: cannot query guest memory, although nothing can ever be mapped there and the shader never dereferences it.On Windows, treat a range above the user address limit as unmapped (the Linux
procmap_query//proc/self/mapspath already reports an uncovered range that way) instead of failing the query. The limit is read once fromGetSystemInfo.Tested
Windows 11, MinGW-w64 GCC 15.2.0, Release.
agc_driver_graphics_testspasses with the change; without it the new assertion fails withAGC driver: cannot query guest memory. The test coversGuestMemory::AccessibleandCommittedRangeson addresses above the user address space.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 repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T20:53:20Z.
The conventions check is red. I could not retrieve its job log, but the diff contains new explanatory code comments in
GuestMemory.cppandLiveStack.cpp; this repository only permits code comments that document technical debt. The PR body also has no### Checklistsection, which the conventions check requires. Please remove or document the comments under the debt rules, add the required checklist section, and rerun conventions. The Windows behavior and regression test themselves look narrowly scoped from this diff.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T20:58:10Z.
The updated head removes the explanatory comments and adds the checklist, and the latest conventions run passes. Thanks for addressing those findings. The Windows test report is still from your earlier validation; I did not rerun the Windows test locally.
Imported from boykopovar/AnyPS5. Originally posted by ymatrix1 on 2026-10-13T20:58:15Z.
Fixed both: removed the explanatory comments from
GuestMemory.cppandLiveStack.cpp(the cause and the0xf00000000000V# context now live in the commit message), and added the### Checklistsection to the PR body. Conventions is green now. The behavior and the regression test are unchanged.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T03:05:49Z.
Title evidence for this PR (Windows 10, NVIDIA GeForce RTX 4080 SUPER, one run each, no picture checked): Kena: Bridge of Spirits (PPSA01746). On plain
maina 300 s run of ours stopped after about 187 s withterminate called after throwing an instance of 'std::runtime_error'/what(): AGC driver: cannot query guest memory, which is the failure this PR describes. With this PR (headaec5ba133,main2ba3147ac) that abort did not occur in one run; the title then stopped after about 84 s on a different error (image descriptor is incompatible with the static runtime image interface, a 3D T# read as a 2D array, see #5555). Not checked: the rendered picture, a control run on exactly the samemainwithout this PR, other titles.AI-assisted (Claude Code).