Skip to content

fix(agc): stop the profile output at shutdown only if it was created - #2112

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
LeandroLP23:fix/agc-profile-output-shutdown
Oct 9, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
LeandroLP23:fix/agc-profile-output-shutdown

Conversation

@LeandroLP23

Copy link
Copy Markdown
Contributor

What

Since #1367, guest_video_out_wqhd_detection fails on a Windows host whose Vulkan has no VK_KHR_surface, as on the CI runner:

skipped, no display or Vulkan device: DisplayWindow: Installed Vulkan doesn't implement the VK_KHR_surface extension
...
guest_video_out_wqhd_detection ..................***Failed

The test returns its skip code 77, but the process then exits with 0x20474343, an unhandled GCC C++ exception. #1367 starts the AGC driver on the first VideoOut call, so its shutdown now runs at exit even when the window could not be created. The shutdown called ProfileOutput_nid_no_patch().Stop(), which constructs the profile output if nothing printed to it yet, and its constructor starts the writer thread during process exit, where creating the thread throws.

The shutdown now stops the profile output only if it was created.

The offscreen SDL driver failing to create a Vulkan window on Windows (@popcoder565 on #1225) is a separate effect of #1367; this only makes the skip path exit cleanly.

Tested

Windows 11, MinGW-w64 GCC 15.2.0, Release, main 6cc0503:

  • guest_video_out_wqhd_detection_no_vulkan, new and Windows-only: the same test with VK_DRIVER_FILES and VK_ICD_FILENAMES pointing to a missing manifest. It fails on main (exit 0x20474343 after the skip message) and is skipped with this change. guest_video_out_wqhd_detection still passes on an AMD Radeon 860M.
  • The profile output, VideoOut and buffer reuse tests pass; tools/check_conventions.py passes.

main 6cc0503 doesn't build its AGC driver tests without #2093, so the fork CI run is on this branch with #2093 merged: https://github.com/LeandroLP23/AnyPS5/actions/runs/37906483462, all jobs pass (Windows 495/495, both guest_video_out_wqhd_detection entries skipped).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (fix(build): declare SPIRV headers for Vulkan helper tests #2093 for the AGC driver tests to build on current main)
  • AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks, this is the fix for the Windows guest_video_out_wqhd_detection failure on main. CI is red only because the branch predates #2099 (the spirv/unified1/spirv.hpp include path). Could you rebase onto current main? Then it can get a full build and go in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LeandroLP23
LeandroLP23 force-pushed the fix/agc-profile-output-shutdown branch from c54b31e to 9842768 Compare October 9, 2026 09:27
@LeandroLP23

Copy link
Copy Markdown
Contributor Author

Rebased onto main d9484c7; the full build passes here, with guest_video_out_wqhd_detection passing and the no-Vulkan variant skipped.

@github-actions github-actions Bot added build prx agc libSceAgc* labels Oct 9, 2026
@oneandonlydean
oneandonlydean merged commit d70b899 into boykopovar:main Oct 9, 2026
8 checks passed
@LeandroLP23
LeandroLP23 deleted the fix/agc-profile-output-shutdown branch October 10, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants