feat(agc-driver): report GPU capture as unavailable #2851

Closed
alfalfa-star wants to merge 4 commits from upstream-pr/2851 into main
alfalfa-star commented 2026-10-10 16:36:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-10T16:36:59Z.


What

Implements the four libSceAgcDriver capture exports that still called NotImplemented_nid_no_patch:

  • sceAgcDriverRequestCaptureStart, sceAgcDriverRequestCaptureStop, sceAgcDriverTriggerCapture take no arguments and return DEBUG_UNAVAILABLE (0x8A6C1000), since no capture tool is attached. OpenAGC's agcdriver.h and SharpProspero's SceAgcDriver.cs both declare RequestCaptureStart without arguments. sceAgcDriverIsCaptureInProgress already returns false.
  • sceAgcDriverGetShaderDebuggingStatus returns 1.

Sources: OpenAGC returns the same code for the capture calls; whether a console with no capture attached does the same is unconfirmed. The value 1 is the constant OpenAGC reads from firmware 5.50 (rJUyMrDdxJg at 0x6740); what it means is unknown. Both are recorded in TechnicalDebt.

Tested

Linux (Arch, GCC), Release build, on main 57f96fd2:

  • guest_agc_driver_resources: checks the three capture calls' error code, that no capture is reported in progress afterwards, and the debugging status value. It aborts without this change (exit 134).
  • Full ctest on main 90c152e8 merged with this branch, #2848 and #2853: 813/813 passed (4 skipped for lack of a display).
  • tools/check_conventions.py --base upstream/main passed.

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. Adds the same DEBUG_UNAVAILABLE constant to Status.cpp and touches the same test as #2849, so whichever merges second needs a rebase
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4812781889 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-10T16:36:59Z. --- ### What Implements the four libSceAgcDriver capture exports that still called `NotImplemented_nid_no_patch`: - `sceAgcDriverRequestCaptureStart`, `sceAgcDriverRequestCaptureStop`, `sceAgcDriverTriggerCapture` take no arguments and return `DEBUG_UNAVAILABLE` (`0x8A6C1000`), since no capture tool is attached. OpenAGC's `agcdriver.h` and SharpProspero's `SceAgcDriver.cs` both declare `RequestCaptureStart` without arguments. `sceAgcDriverIsCaptureInProgress` already returns false. - `sceAgcDriverGetShaderDebuggingStatus` returns 1. Sources: [OpenAGC](https://github.com/OpenAGC/OpenAGC/blob/main/src/game_compat.c) returns the same code for the capture calls; whether a console with no capture attached does the same is unconfirmed. The value 1 is the constant OpenAGC reads from firmware 5.50 (`rJUyMrDdxJg` at 0x6740); what it means is unknown. Both are recorded in TechnicalDebt. ### Tested Linux (Arch, GCC), Release build, on `main` 57f96fd2: - `guest_agc_driver_resources`: checks the three capture calls' error code, that no capture is reported in progress afterwards, and the debugging status value. It aborts without this change (exit 134). - Full `ctest` on `main` 90c152e8 merged with this branch, #2848 and #2853: 813/813 passed (4 skipped for lack of a display). - `tools/check_conventions.py --base upstream/main` passed. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none. Adds the same `DEBUG_UNAVAILABLE` constant to `Status.cpp` and touches the same test as #2849, so whichever merges second needs a rebase - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-10 16:38:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T16:38:40Z.


Progress report (66d577d → ae327c4)

📈 System libraries: 85.56% (+0.12%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceAgcDriver sceAgcDriverGetShaderDebuggingStatus
libSceAgcDriver sceAgcDriverRequestCaptureStart
libSceAgcDriver sceAgcDriverRequestCaptureStop
libSceAgcDriver sceAgcDriverTriggerCapture
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099786737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#issuecomment-6099786737). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T16:38:40Z. --- <!-- progress-report --> ### Progress report (66d577d → ae327c4) 📈 **System libraries**: 85.56% (+0.12%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceAgcDriver | `sceAgcDriverGetShaderDebuggingStatus` | | libSceAgcDriver | `sceAgcDriverRequestCaptureStart` | | libSceAgcDriver | `sceAgcDriverRequestCaptureStop` | | libSceAgcDriver | `sceAgcDriverTriggerCapture` | </details>
alfalfa-star commented 2026-10-10 17:03:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-10T17:03:35Z.


The one failing job, write-watch (macos-15-intel), is the same write_watch_threads timeout as on #2699. The three repeats took 16.8 s, 23.3 s and then hit the 30 s limit. This PR only touches libSceAgcDriver and GuestAgcDriverResources.cpp, which that job does not build. In the last 100 Build runs this job failed 9 times, once on main. Could someone with rights rerun it?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100012569 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#issuecomment-6100012569). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-10T17:03:35Z. --- The one failing job, `write-watch (macos-15-intel)`, is the same `write_watch_threads` timeout as on #2699. The three repeats took 16.8 s, 23.3 s and then hit the 30 s limit. This PR only touches `libSceAgcDriver` and `GuestAgcDriverResources.cpp`, which that job does not build. In the last 100 Build runs this job failed 9 times, once on `main`. Could someone with rights rerun it?
oneandonlydean commented 2026-10-10 19:18:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T19:18:04Z.


Same as #2849: which title calls these? For sceAgcDriverGetShaderDebuggingStatus the title would also show what the 1 means to it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101236365 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#issuecomment-6101236365). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T19:18:04Z. --- Same as #2849: which title calls these? For `sceAgcDriverGetShaderDebuggingStatus` the title would also show what the 1 means to it.
screamm commented 2026-10-10 23:08:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-10T23:08:09Z.


Windows validation of the current head 69be6331 merged onto main 91b13413.

Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including the libs target, NVIDIA RTX 4070.

  • ctest -j8 -E "^agc_driver_|^video_out_flip": 478/479, including guest_agc_driver_resources. The one failure was the GPU test agc_driver with a heap-corruption exit under -j8 load; it passes 2/2 when run alone on the same binaries, so I count it as load-related and unrelated to this change.
  • The other GPU execution tests (agc_driver_*) were not run; two of them fail on unchanged main on this host for unrelated reasons.

Validation run with Claude Code assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103163868 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#issuecomment-6103163868). Originally posted by [screamm](https://github.com/screamm) on 2026-10-10T23:08:09Z. --- Windows validation of the current head `69be6331` merged onto `main` `91b13413`. Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including the `libs` target, NVIDIA RTX 4070. - `ctest -j8 -E "^agc_driver_|^video_out_flip"`: 478/479, including `guest_agc_driver_resources`. The one failure was the GPU test `agc_driver` with a heap-corruption exit under `-j8` load; it passes 2/2 when run alone on the same binaries, so I count it as load-related and unrelated to this change. - The other GPU execution tests (`agc_driver_*`) were not run; two of them fail on unchanged `main` on this host for unrelated reasons. Validation run with Claude Code assistance.
adriadam10 commented 2026-10-11 00:08:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T00:08:57Z.

Review: CHANGES_REQUESTED


Thanks for the Windows run and the clear TechnicalDebt entry. Before this can go in:

  • No title is named. @oneandonlydean asked which title calls these exports (and, for sceAgcDriverGetShaderDebuggingStatus, what the 1 means to it) and that is still unanswered. Please add the title ID and the log line where it stops on main.
  • core/libs/prx/libSceAgcDriver/State/src/Status.cpp:26,30,34,38: the returned values (0x8A6C1000 for the capture calls, 1 for the debugging status) come from one source (OpenAGC) and are unconfirmed on a console, as the PR itself says. Unverified codes should keep throwing until a title or a second source confirms them.
  • Status.cpp:24: sceAgcDriverRequestCaptureStart takes const char* here, but SharpProspero declares it without arguments (Interop/Agc/SceAgcDriver.cs:206). Please say which one the signature follows and why.

The red write-watch (macos-15-intel) job is the known write_watch_threads flake, not this change. Happy to look again once a title and a confirmed value are in.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5481281132 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#pullrequestreview-5481281132). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T00:08:57Z. **Review:** CHANGES_REQUESTED --- Thanks for the Windows run and the clear TechnicalDebt entry. Before this can go in: - No title is named. @oneandonlydean asked which title calls these exports (and, for `sceAgcDriverGetShaderDebuggingStatus`, what the 1 means to it) and that is still unanswered. Please add the title ID and the log line where it stops on `main`. - `core/libs/prx/libSceAgcDriver/State/src/Status.cpp:26,30,34,38`: the returned values (`0x8A6C1000` for the capture calls, `1` for the debugging status) come from one source (OpenAGC) and are unconfirmed on a console, as the PR itself says. Unverified codes should keep throwing until a title or a second source confirms them. - `Status.cpp:24`: `sceAgcDriverRequestCaptureStart` takes `const char*` here, but SharpProspero declares it without arguments (`Interop/Agc/SceAgcDriver.cs:206`). Please say which one the signature follows and why. The red `write-watch (macos-15-intel)` job is the known `write_watch_threads` flake, not this change. Happy to look again once a title and a confirmed value are in.
alfalfa-star commented 2026-10-11 09:45:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-11T09:45:18Z.


No title I can run reaches the capture exports on current main (90c152e8):

  • LEGO Horizon Adventures (PPSA14632) aborts after about 35 s at color views of several array slices are unsupported (#2102). My local test branch gets past that and other stops; there it played 385 s with scripted input, through New Game and a save, without calling the capture exports.
  • Kena: Bridge of Spirits (PPSA01802) crashes in game code after about 60 s, with no not implemented line before it.

I'm converting this to a draft until a title stops at it. Then I'll post the title ID and the log line and mark it ready.

Changed:

  • sceAgcDriverRequestCaptureStart now takes no arguments. OpenAGC's agcdriver.h and SharpProspero's SceAgcDriver.cs both declare it that way; the const char* came from main's earlier stub. The test calls it without arguments.
  • The entry moved under Silent stubs, as main's conventions check now requires.

On the values: I found no second source. sharpemu, REmu and shadPS4 only list the names, and prosper has no golden for them. They stay as in the PR until a title reaching them shows how it treats the result.

Tested: Linux, GCC, Release, RX 9070 XT (RADV): full ctest 813/813 (4 video_out_flip_* skipped) on main 90c152e8 merged with this branch, #2848 and #2853; tools/check_conventions.py passes.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107713801 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#issuecomment-6107713801). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-11T09:45:18Z. --- No title I can run reaches the capture exports on current `main` (90c152e8): - LEGO Horizon Adventures (PPSA14632) aborts after about 35 s at `color views of several array slices are unsupported` (#2102). My local test branch gets past that and other stops; there it played 385 s with scripted input, through New Game and a save, without calling the capture exports. - Kena: Bridge of Spirits (PPSA01802) crashes in game code after about 60 s, with no `not implemented` line before it. I'm converting this to a draft until a title stops at it. Then I'll post the title ID and the log line and mark it ready. **Changed:** - `sceAgcDriverRequestCaptureStart` now takes no arguments. OpenAGC's `agcdriver.h` and SharpProspero's `SceAgcDriver.cs` both declare it that way; the `const char*` came from `main`'s earlier stub. The test calls it without arguments. - The entry moved under Silent stubs, as `main`'s conventions check now requires. On the values: I found no second source. sharpemu, REmu and shadPS4 only list the names, and prosper has no golden for them. They stay as in the PR until a title reaching them shows how it treats the result. **Tested:** Linux, GCC, Release, RX 9070 XT (RADV): full `ctest` 813/813 (4 `video_out_flip_*` skipped) on `main` 90c152e8 merged with this branch, #2848 and #2853; `tools/check_conventions.py` passes. AI-assisted: yes (Claude Code)
adriadam10 commented 2026-10-11 09:45:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T09:45:45Z.

Review: CHANGES_REQUESTED


Thanks for the signature fix and the TechnicalDebt entry; both look right, and guest_agc_driver_resources fails without the change and passes with it. Two points are still open:

  • No title is named. @oneandonlydean's question (which title calls sceAgcDriverRequestCaptureStart/Stop/TriggerCapture and sceAgcDriverGetShaderDebuggingStatus, and what the 1 means to it) is unanswered. Please add the title ID and the call site or log line where it stops on main; Astro's Playroom does not import any of them, so we cannot check it from our side.
  • core/libs/prx/libSceAgcDriver/State/src/Status.cpp:24,28,32,36: 0x8A6C1000 and the constant 1 come from a single source (OpenAGC) and are unconfirmed on a console. Where main threw, returning a plausible unverified value is not exact-or-throw. Either a second source or a title's observed behaviour, or keep these throwing.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5482801173 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#pullrequestreview-5482801173). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T09:45:45Z. **Review:** CHANGES_REQUESTED --- Thanks for the signature fix and the TechnicalDebt entry; both look right, and `guest_agc_driver_resources` fails without the change and passes with it. Two points are still open: - No title is named. @oneandonlydean's question (which title calls `sceAgcDriverRequestCaptureStart`/`Stop`/`TriggerCapture` and `sceAgcDriverGetShaderDebuggingStatus`, and what the 1 means to it) is unanswered. Please add the title ID and the call site or log line where it stops on `main`; Astro's Playroom does not import any of them, so we cannot check it from our side. - `core/libs/prx/libSceAgcDriver/State/src/Status.cpp:24,28,32,36`: `0x8A6C1000` and the constant `1` come from a single source (OpenAGC) and are unconfirmed on a console. Where `main` threw, returning a plausible unverified value is not exact-or-throw. Either a second source or a title's observed behaviour, or keep these throwing.
oneandonlydean commented 2026-10-11 23:58:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:58:08Z.


Same as #2849: closing until a title reaches these; the title will also settle the return values.

You're welcome to reopen this if you think it was closed by mistake or the situation changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115344850 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2851#issuecomment-6115344850). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:58:08Z. --- Same as #2849: closing until a title reaches these; the title will also settle the return values. You're welcome to reopen this if you think it was closed by mistake or the situation changes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2851
No description provided.