feat(agc): accept disabled shader instrumentation #2850

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

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


What

Implements the two libSceAgc shader instrumentation exports that still called NotImplemented_nid_no_patch:

  • sceAgcSetShaderInstrumentation(flags) accepts 0 and throws for any other value, because what the flags change is unknown.
  • sceAgcGetShaderInstrumentation() returns 0.

Source: OpenAGC describes a title's bundled module storing the flags and the getter returning them; it accepts any value. Accepting only 0 is this PR's choice, not a measured behaviour: what non-zero flags change on a console is unknown, so they throw rather than being stored without effect. Recorded in TechnicalDebt under Silent stubs.

Tested

Linux (Arch, GCC), Release build:

  • agc_platform: new testShaderInstrumentation checks the default, that disabling succeeds, and that non-zero flags throw and are not kept.
  • Full ctest on main 90c152e8 merged with this branch, #2847, #2849 and #2852: 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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4812781680 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-10T16:36:56Z. --- ### What Implements the two libSceAgc shader instrumentation exports that still called `NotImplemented_nid_no_patch`: - `sceAgcSetShaderInstrumentation(flags)` accepts 0 and throws for any other value, because what the flags change is unknown. - `sceAgcGetShaderInstrumentation()` returns 0. Source: [OpenAGC](https://github.com/OpenAGC/OpenAGC/blob/main/src/game_compat.c) describes a title's bundled module storing the flags and the getter returning them; it accepts any value. Accepting only 0 is this PR's choice, not a measured behaviour: what non-zero flags change on a console is unknown, so they throw rather than being stored without effect. Recorded in TechnicalDebt under Silent stubs. ### Tested Linux (Arch, GCC), Release build: - `agc_platform`: new `testShaderInstrumentation` checks the default, that disabling succeeds, and that non-zero flags throw and are not kept. - Full `ctest` on `main` 90c152e8 merged with this branch, #2847, #2849 and #2852: 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 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-10 16:38:32 +00:00 (Migrated from github.com)

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


Progress report (097f4e2 → 095dcee)

📈 System libraries: 85.47% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAgc sceAgcGetShaderInstrumentation
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099785619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#issuecomment-6099785619). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T16:38:32Z. --- <!-- progress-report --> ### Progress report (097f4e2 → 095dcee) 📈 **System libraries**: 85.47% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcGetShaderInstrumentation` | </details>
oneandonlydean commented 2026-10-10 19:18:03 +00:00 (Migrated from github.com)

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


Which title calls sceAgcSetShaderInstrumentation on main? As it stands nothing is implemented beyond accepting 0, so without a title stopping at it I'd close it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101236173 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#issuecomment-6101236173). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T19:18:03Z. --- Which title calls `sceAgcSetShaderInstrumentation` on main? As it stands nothing is implemented beyond accepting 0, so without a title stopping at it I'd close it.
screamm commented 2026-10-10 22:58:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-10T22:58:04Z.


Tried to validate the current head e90ae6f1 on Windows: it no longer merges with main (262c0316 and later). git merge main conflicts in core/libs/prx/libSceAgc/Unimplemented.cpp (both sides remove neighbouring stubs), and GitHub reports the branch as conflicting. A rebase is needed before it can be built as the merge commit; happy to rerun after that.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103086647 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#issuecomment-6103086647). Originally posted by [screamm](https://github.com/screamm) on 2026-10-10T22:58:04Z. --- Tried to validate the current head `e90ae6f1` on Windows: it no longer merges with `main` (`262c0316` and later). `git merge main` conflicts in `core/libs/prx/libSceAgc/Unimplemented.cpp` (both sides remove neighbouring stubs), and GitHub reports the branch as conflicting. A rebase is needed before it can be built as the merge commit; happy to rerun after that.
adriadam10 commented 2026-10-11 00:08:59 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Thanks for the PR. Two things before this can go in:

  • @oneandonlydean asked which title calls sceAgcSetShaderInstrumentation on main and that is still unanswered. Please name the title (PPSA id) and where it stops, or attach a log. Astro's Playroom doesn't import either export, so we have no evidence of use. Without a caller this only moves the progress metric.
  • The branch conflicts with main in core/libs/prx/libSceAgc/Unimplemented.cpp (as @screamm also found). Please rebase and rerun the tests.

Also, the cited OpenAGC code stores the flags and returns them from the getter; it doesn't throw on non-zero values. State in the PR and TechnicalDebt that "accept only 0" is your choice and why, since no PS5 measurement backs it.

If no title needs it, we'll close it; feel free to reopen later with a caller.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5481281336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#pullrequestreview-5481281336). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T00:08:59Z. **Review:** CHANGES_REQUESTED --- Thanks for the PR. Two things before this can go in: - @oneandonlydean asked which title calls `sceAgcSetShaderInstrumentation` on main and that is still unanswered. Please name the title (PPSA id) and where it stops, or attach a log. Astro's Playroom doesn't import either export, so we have no evidence of use. Without a caller this only moves the progress metric. - The branch conflicts with `main` in `core/libs/prx/libSceAgc/Unimplemented.cpp` (as @screamm also found). Please rebase and rerun the tests. Also, the cited OpenAGC code stores the flags and returns them from the getter; it doesn't throw on non-zero values. State in the PR and TechnicalDebt that "accept only 0" is your choice and why, since no PS5 measurement backs it. If no title needs it, we'll close it; feel free to reopen later with a caller.
Mouhand-Kaddo commented 2026-10-11 07:25:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-11T07:25:51Z.


Additional platform validation of standalone PR head e90ae6f15b3bd0a0920a2af73de12764eaf86301 (2026-10-11):

Windows: passed — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, BUILD_TESTING=ON.

1 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run.

Checks: agc_platform_tests.

Command after building: ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^agc_platform_tests$".

This scope checks CPU-side behavior; no GPU execution result is claimed.

No title/gameplay validation. These results cover the standalone head, not a merge with current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106659401 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#issuecomment-6106659401). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-11T07:25:51Z. --- <!-- anyps5-platform-validation:e90ae6f15b3bd0a0920a2af73de12764eaf86301 --> Additional platform validation of standalone PR head `e90ae6f15b3bd0a0920a2af73de12764eaf86301` (2026-10-11): **Windows: passed** — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, `BUILD_TESTING=ON`. 1 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run. Checks: `agc_platform_tests`. Command after building: `ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^agc_platform_tests$"`. This scope checks CPU-side behavior; no GPU execution result is claimed. No title/gameplay validation. These results cover the standalone head, not a merge with current main.
adriadam10 commented 2026-10-11 09:40:38 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Thanks for the rebase and the TechnicalDebt wording; build and agc_platform_tests pass here, and the new test fails without the change.

One point is still open: @oneandonlydean's question. Which title (PPSA id) calls sceAgcSetShaderInstrumentation, and where does it stop? Astro's Playroom doesn't import either export and the only source is OpenAGC, so without a caller this only moves the progress metric. Please name the title or attach a log; otherwise we'll close it (feel free to reopen with a caller).

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5482788063 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#pullrequestreview-5482788063). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T09:40:38Z. **Review:** CHANGES_REQUESTED --- Thanks for the rebase and the TechnicalDebt wording; build and `agc_platform_tests` pass here, and the new test fails without the change. One point is still open: @oneandonlydean's question. Which title (PPSA id) calls `sceAgcSetShaderInstrumentation`, and where does it stop? Astro's Playroom doesn't import either export and the only source is OpenAGC, so without a caller this only moves the progress metric. Please name the title or attach a log; otherwise we'll close it (feel free to reopen with a caller).
alfalfa-star commented 2026-10-11 09:45:15 +00:00 (Migrated from github.com)

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


No title I can run reaches sceAgcSetShaderInstrumentation 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 sceAgcSetShaderInstrumentation.
  • 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 (rebased onto main, which resolves the Unimplemented.cpp conflict):

  • TechnicalDebt now says that OpenAGC stores any flags, and that accepting only 0 is this project's choice, not a measured behaviour.
  • The entry moved under Silent stubs, which main's conventions check now requires for the getter.

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

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107713289 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#issuecomment-6107713289). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-11T09:45:15Z. --- No title I can run reaches `sceAgcSetShaderInstrumentation` 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 `sceAgcSetShaderInstrumentation`. - 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** (rebased onto `main`, which resolves the `Unimplemented.cpp` conflict): - TechnicalDebt now says that OpenAGC stores any flags, and that accepting only 0 is this project's choice, not a measured behaviour. - The entry moved under Silent stubs, which `main`'s conventions check now requires for the getter. **Tested:** Linux, GCC, Release, RX 9070 XT (RADV): full `ctest` 813/813 (4 `video_out_flip_*` skipped) on `main` 90c152e8 merged with this branch, #2847, #2849 and #2852; `tools/check_conventions.py` passes. AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-14 02:40:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:40:11Z.


Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6159671804 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2850#issuecomment-6159671804). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T02:40:11Z. --- Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

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!2850
No description provided.