feat(agc): report VK_EXT_device_fault details on device loss #5460
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5460"
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-13T20:14:50Z.
What
When the Vulkan device is lost, AnyPS5 currently prints only the failing call and
Vulkan result -4. Nothing says what the GPU was doing or which address faulted, and the driver's own record of the fault is gone once the process exits.This enables
VK_EXT_device_faultwhen the device supports itsdeviceFaultfeature. When a recorder or command batch submission or wait returnsVK_ERROR_DEVICE_LOST,vkGetDeviceFaultInfoEXTis queried once per device. The driver's description and the faulting GPU addresses, with their access type and precision, go to stderr before the unchanged error is thrown:Context::CheckResultreports, then callsCheckas before. It replacesCheckat the six recorder sites (vkQueueSubmit recorder,vkWaitSemaphoresKHR recorderx3,vkWaitForFences recorder,vkDeviceWaitIdle after recorder fence failure) and the twoCommandBatchsites (vkQueueSubmit graphics,vkWaitForFences graphics).APS5_NO_DEVICE_FAULT=1, behaves exactly as before.docs/user/USAGE.md(GPU fault reports). The limits are in the libSceAgcDriver debt file: the presentation path is not covered, and a device reports only once.Tested
Windows 11 Pro 26200, MinGW-w64 GCC 15.2.0 (WinLibs UCRT r7), Release, on
maina0f5916a2.agc_driver_device_fault(CPU, mockvkGetDeviceFaultInfoEXT): passed. It covers:VK_ERROR_DEVICE_LOSTqueries, and a second loss is not reported again;Context::CheckResultstill throws the originalVulkan result -4, with or without a reporter.agc_driverandagc_driver_graphics(RTX 4070), which submit and wait through the changed recorder and command batch paths: passed.Vulkan device fault reporting enabled. WithAPS5_NO_DEVICE_FAULT=1the line is absent and the extension is not enabled.tools/check_conventions.py --base upstream/mainwith this description: passed.Demon's Souls (PPSA01341 v1.07), RTX 4070 (driver 596.21), on a local branch that is not
main: an earlier, opt-in version of this report (same query and output format, behindAPS5_GPU_CHECKPOINTS) reported three natural device losses at character creation aswrite-invalidaddresses with 4 KiB precision. Matched against a separate local binding history, each address was the last 64 KiB of a 2.25 MiB buffer that had already been freed: about 100 and 120 s earlier in the two runs that recorded the time. Before the report, the logs had onlyVulkan result -4. The address is what narrowed the investigation to a GPU copy writing through a stale address. This PR alone does not move any title further. It makes a device loss diagnosable from a log.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 github-actions[bot] on 2026-10-13T20:32:20Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/include/Context.hppL178core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL1633, L3123-3124docs/user/USAGE.mdL160core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL1633, L3123-3124core/libs/prx/libSceAgcDriver/CMakeLists.txtL347core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cppL3182-3191core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL1633core/libs/prx/libSceAgcDriver/tests/DeviceFault.cppcore/libs/prx/libSceAgcDriver/tests/DeviceFault.cppImported from boykopovar/AnyPS5. Originally posted by Sam-mon7 on 2026-10-13T20:39:46Z.
Closing in favour of #5453, which was opened first, covers more call sites (the global
Check, the present path, and NVIDIA checkpoints) and implements the same report. I'll test #5453 on Windows with an RTX 4070 and post the results there, along with what this report showed on real device losses in PPSA01341.AI-assisted: yes
Pull request closed