Repository navigation
Conversation
Enable VK_EXT_device_fault when the device supports its deviceFault feature (APS5_NO_DEVICE_FAULT=1 leaves it off). When a recorder or command batch submission or wait returns VK_ERROR_DEVICE_LOST, query vkGetDeviceFaultInfoEXT once per device and write the description and the faulting GPU addresses to stderr before the error is thrown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
Merged
|
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.
|
Contributor
Author
|
Closing in favour of #5453, which was opened first, covers more call sites (the global AI-assisted: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
maina0f5916.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