feat(libSceAgcDriver): return the retail errors of the unavailable driver calls #13471

Merged
BunnyFl merged 2 commits from upstream-pr/13471 into main 2026-10-30 21:29:05 +00:00
BunnyFl commented 2026-10-30 16:18:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-10-30T16:18:32Z.


What

Seven libSceAgcDriver exports in Export.cpp still throw. In firmware 13.42's libSceAgcDriver.sprx (read from disassembly, not measured on a console), they print a message and return a fixed error, the same way sceAgcDriverSetTargetRingForDiag does, which Unimplemented.cpp already implements:

Export Firmware 13.42
sceAgcDriverAcquireRazorACQ, sceAgcDriverGetPaDebugInterfaceVersion, sceAgcDriverSetHsOffchipParamDirect, sceAgcDriverSubmitMultiCommandBuffersDirect, sceAgcDriverSubmitToRazorACQ, sceAgcDriverSuspendPointSubmitDirect prints "permission insufficient" to stderr and returns 0x8A6D0001, without reading any argument
sceAgcDriverModuleRegistration prints one of two "Module Registration Failed" messages ("Invalid interface" for a null second argument, otherwise "Invalid index") and returns 0x8A6D0003

They move from Export.cpp to Unimplemented.cpp and return these codes. As for sceAgcDriverSetTargetRingForDiag, the log messages are not reproduced; its debt entry now covers all eight, and the seven names leave the Export.cpp entries that list throwing stubs. The progress report lists the seven as behaviourally empty. The firmware's own bodies are a fixed return, so that is the expected classification, not a placeholder.

Tested

Windows 11, WinLibs GCC 15.2, Release. No title was run.

  • agc_driver_unsupported_diagnostics now checks the return codes of the seven. On this branch (base main 9f748f4d8e) it passes 3/3. With the seven made to throw as main's stubs do, it fails 3/3. No other code or test in the repository calls them.
  • Validation layers, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V, on main and on this branch, same machine and GPU: agc_driver_unsupported_diagnostics passes on both, neither log reports the layer missing, and neither has a VUID- error. The test creates no Vulkan device, so the layer had nothing to check.
  • The seven bodies were read in the firmware disassembly, including the message strings; nothing from the firmware is attached or added.
  • check_conventions.py --base upstream/main passes. pr_overlap.py: #11104 changes the same lines of UnsupportedDiagnostics.cpp; it lists these exports to check they resolve by name and does not implement them. The 52 PRs it could not compare (they conflict with main) share the debt file, but none of their diffs names these seven. progress.py --compare: +7 implemented functions in libSceAgcDriver, all seven behaviourally empty as explained above.

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 under Silent stubs in their library's technical debt file
  • 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: #11104 (it changes the same lines of UnsupportedDiagnostics.cpp and is older, so this PR lands second and I will rebase it once #11104 merges)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Windows 11, AMD Radeon RX 9070 XT, driver 32.0.32015.7029. The focused tests ran with the validation-layer variables on main and this branch, but they create no Vulkan device, so they exercise no GPU work (agc_driver_unsupported_diagnostics)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5087481631 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13471). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-10-30T16:18:32Z. --- ### What Seven libSceAgcDriver exports in `Export.cpp` still throw. In firmware 13.42's libSceAgcDriver.sprx (read from disassembly, not measured on a console), they print a message and return a fixed error, the same way `sceAgcDriverSetTargetRingForDiag` does, which `Unimplemented.cpp` already implements: | Export | Firmware 13.42 | |---|---| | `sceAgcDriverAcquireRazorACQ`, `sceAgcDriverGetPaDebugInterfaceVersion`, `sceAgcDriverSetHsOffchipParamDirect`, `sceAgcDriverSubmitMultiCommandBuffersDirect`, `sceAgcDriverSubmitToRazorACQ`, `sceAgcDriverSuspendPointSubmitDirect` | prints "permission insufficient" to stderr and returns `0x8A6D0001`, without reading any argument | | `sceAgcDriverModuleRegistration` | prints one of two "Module Registration Failed" messages ("Invalid interface" for a null second argument, otherwise "Invalid index") and returns `0x8A6D0003` | They move from `Export.cpp` to `Unimplemented.cpp` and return these codes. As for `sceAgcDriverSetTargetRingForDiag`, the log messages are not reproduced; its debt entry now covers all eight, and the seven names leave the `Export.cpp` entries that list throwing stubs. The progress report lists the seven as behaviourally empty. The firmware's own bodies are a fixed return, so that is the expected classification, not a placeholder. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11, WinLibs GCC 15.2, Release. No title was run. - `agc_driver_unsupported_diagnostics` now checks the return codes of the seven. On this branch (base `main` `9f748f4d8e`) it passes 3/3. With the seven made to throw as `main`'s stubs do, it fails 3/3. No other code or test in the repository calls them. - Validation layers, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`, on `main` and on this branch, same machine and GPU: `agc_driver_unsupported_diagnostics` passes on both, neither log reports the layer missing, and neither has a `VUID-` error. The test creates no Vulkan device, so the layer had nothing to check. - The seven bodies were read in the firmware disassembly, including the message strings; nothing from the firmware is attached or added. - `check_conventions.py --base upstream/main` passes. `pr_overlap.py`: #11104 changes the same lines of `UnsupportedDiagnostics.cpp`; it lists these exports to check they resolve by name and does not implement them. The 52 PRs it could not compare (they conflict with `main`) share the debt file, but none of their diffs names these seven. `progress.py --compare`: +7 implemented functions in libSceAgcDriver, all seven behaviourally empty as explained above. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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: #11104 (it changes the same lines of `UnsupportedDiagnostics.cpp` and is older, so this PR lands second and I will rebase it once #11104 merges) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Windows 11, AMD Radeon RX 9070 XT, driver 32.0.32015.7029. The focused tests ran with the validation-layer variables on `main` and this branch, but they create no Vulkan device, so they exercise no GPU work (`agc_driver_unsupported_diagnostics`) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-30 16:24:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T16:24:49Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The constant return implementations match the PR's stated behavior, but the test change conflicts with open PR #11104 and the required landing order is not recorded.

What I ran

Reviewed head d34913e943783e0166c8512b7771a42954403f18 against PR base/current main 9304896d89f070f65b8f38bd3a8024d5c19f8fe1. The branch merge preview was clean (tree 5ef694b110e8da4508a6c842cb449a607f7b3619). A pairwise preview with #11104 head 9e5738a59f6a5c209015b6a964aac0786348dcbd produced a content conflict in UnsupportedDiagnostics.cpp. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0.

git diff --check 9304896d89f070f65b8f38bd3a8024d5c19f8fe1...d34913e943783e0166c8512b7771a42954403f18
python3 tools/check_conventions.py --base 9304896d89f070f65b8f38bd3a8024d5c19f8fe1 --head d34913e943783e0166c8512b7771a42954403f18
python3 tools/pr_abi_audit.py --base 9304896d89f070f65b8f38bd3a8024d5c19f8fe1 --head d34913e943783e0166c8512b7771a42954403f18 --json
python3 tools/pr_test_quality.py --root . core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/review/pr-13471
git merge-tree --write-tree refs/remotes/review/pr-13471 refs/remotes/review/pr-11104

Results

Check Result
Diff check and conventions Passed
ABI audit Passed: 77 symbols, no findings
Test-quality heuristic Reported possible unregistered C++ test; registration is present in the PR's CMake file
PR merge preview onto main Clean
Pairwise merge with #11104 Content conflict in core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
Aggregate no-build precheck Its isolated copy lacked local-only, untracked audit scripts; direct relevant checks above passed
Unedited output from direct checks
All conventions checks passed.
status: passed
symbols: 77
findings: []
core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp:1: possible-unregistered-cpp-test: Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage.
Heuristic findings require manual interpretation.
5ef694b110e8da4508a6c842cb449a607f7b3619
dfb3d0a7c2b9fa002a28a8261a15bcc7f21fa8a5
100644 85a226d1bfa91e806dc659679747929bf77fd729 1	core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
100644 f1546a3e4bf22f82030b168c8582ef0ccd92e401 2	core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
100644 dd6089f61da98161af4eda1fd0853e45cc324ae7 3	core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
Auto-merging CMakeLists.txt
Auto-merging core/libs/prx/libSceAgcDriver/CMakeLists.txt
Auto-merging core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp
Auto-merging core/libs/prx/libSceNgs2.native/tests/Ngs2HandleErrors.cpp
Auto-merging docs/dev/debt/libSceAgcDriver.md
Auto-merging docs/dev/debt/libSceNgs2.native.md
Auto-merging docs/dev/debt/libSceNpUniversalDataSystem.md
git diff --check produced no output.
</details>

<details>
<summary>Aggregate precheck helper limitation</summary>

```text
/usr/bin/python3: can't open file '/tmp/anyps5-pr13471-precheck/head-d34913e94378-cfe33c7a/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr13471-precheck/head-d34913e94378-cfe33c7a/tools/pr_test_quality.py': [Errno 2] No such file or directory

Negative control

Not run locally because the regression test requires a built target. The PR author reports a Windows test and a negative control; I did not independently reproduce them.

Findings

Blocking

#11104 adds a different block of checks to the same UnsupportedDiagnostics.cpp test. The pairwise merge preview confirms a content conflict. The contribution rules say authors should agree which overlapping change lands first and record the dependency on the branch that lands second. Please coordinate the order with #11104's author and update the applicable checklist before merge.

Non-blocking

The PR describes firmware-disassembly evidence, but I did not independently inspect that disassembly. The implementation does not reproduce the reported log messages; the PR documents that omission.

Sources

Not verified

No local build or C++ test was run. Hosted checks were queued at final refresh. The Windows focused Vulkan test and firmware behavior in the description are author-reported, not independently verified.

To get this to a good state

Agree the test-file landing order with #11104's author and record the dependency on the branch that lands second. I will rerun the same relevant checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5715324120 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13471#pullrequestreview-5715324120). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T16:24:49Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The constant return implementations match the PR's stated behavior, but the test change conflicts with open PR #11104 and the required landing order is not recorded. ## What I ran Reviewed head `d34913e943783e0166c8512b7771a42954403f18` against PR base/current main `9304896d89f070f65b8f38bd3a8024d5c19f8fe1`. The branch merge preview was clean (tree `5ef694b110e8da4508a6c842cb449a607f7b3619`). A pairwise preview with #11104 head `9e5738a59f6a5c209015b6a964aac0786348dcbd` produced a content conflict in `UnsupportedDiagnostics.cpp`. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. ```sh git diff --check 9304896d89f070f65b8f38bd3a8024d5c19f8fe1...d34913e943783e0166c8512b7771a42954403f18 python3 tools/check_conventions.py --base 9304896d89f070f65b8f38bd3a8024d5c19f8fe1 --head d34913e943783e0166c8512b7771a42954403f18 python3 tools/pr_abi_audit.py --base 9304896d89f070f65b8f38bd3a8024d5c19f8fe1 --head d34913e943783e0166c8512b7771a42954403f18 --json python3 tools/pr_test_quality.py --root . core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/review/pr-13471 git merge-tree --write-tree refs/remotes/review/pr-13471 refs/remotes/review/pr-11104 ``` ## Results | Check | Result | | --- | --- | | Diff check and conventions | Passed | | ABI audit | Passed: 77 symbols, no findings | | Test-quality heuristic | Reported possible unregistered C++ test; registration is present in the PR's CMake file | | PR merge preview onto main | Clean | | Pairwise merge with #11104 | Content conflict in `core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp` | | Aggregate no-build precheck | Its isolated copy lacked local-only, untracked audit scripts; direct relevant checks above passed | <details> <summary>Unedited output from direct checks</summary> ```text All conventions checks passed. status: passed symbols: 77 findings: [] core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp:1: possible-unregistered-cpp-test: Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage. Heuristic findings require manual interpretation. 5ef694b110e8da4508a6c842cb449a607f7b3619 dfb3d0a7c2b9fa002a28a8261a15bcc7f21fa8a5 100644 85a226d1bfa91e806dc659679747929bf77fd729 1 core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp 100644 f1546a3e4bf22f82030b168c8582ef0ccd92e401 2 core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp 100644 dd6089f61da98161af4eda1fd0853e45cc324ae7 3 core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp Auto-merging CMakeLists.txt Auto-merging core/libs/prx/libSceAgcDriver/CMakeLists.txt Auto-merging core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp Auto-merging core/libs/prx/libSceNgs2.native/tests/Ngs2HandleErrors.cpp Auto-merging docs/dev/debt/libSceAgcDriver.md Auto-merging docs/dev/debt/libSceNgs2.native.md Auto-merging docs/dev/debt/libSceNpUniversalDataSystem.md git diff --check produced no output. </details> <details> <summary>Aggregate precheck helper limitation</summary> ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr13471-precheck/head-d34913e94378-cfe33c7a/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr13471-precheck/head-d34913e94378-cfe33c7a/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Negative control Not run locally because the regression test requires a built target. The PR author reports a Windows test and a negative control; I did not independently reproduce them. ## Findings ### Blocking #11104 adds a different block of checks to the same `UnsupportedDiagnostics.cpp` test. The pairwise merge preview confirms a content conflict. The contribution rules say authors should agree which overlapping change lands first and record the dependency on the branch that lands second. Please coordinate the order with #11104's author and update the applicable checklist before merge. ### Non-blocking The PR describes firmware-disassembly evidence, but I did not independently inspect that disassembly. The implementation does not reproduce the reported log messages; the PR documents that omission. ## Sources - [#11104 test update at head 9e5738a59f6a5c209015b6a964aac0786348dcbd](https://github.com/boykopovar/AnyPS5/blob/9e5738a59f6a5c209015b6a964aac0786348dcbd/core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp) - [#13471 test update at reviewed head](https://github.com/boykopovar/AnyPS5/blob/d34913e943783e0166c8512b7771a42954403f18/core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp) - [Contribution rules at main commit 9304896d89f070f65b8f38bd3a8024d5c19f8fe1](https://github.com/boykopovar/AnyPS5/blob/9304896d89f070f65b8f38bd3a8024d5c19f8fe1/CONTRIBUTING.md) ## Not verified No local build or C++ test was run. Hosted checks were queued at final refresh. The Windows focused Vulkan test and firmware behavior in the description are author-reported, not independently verified. ## To get this to a good state Agree the test-file landing order with #11104's author and record the dependency on the branch that lands second. I will rerun the same relevant checks on the updated head.
MarcZX10 commented 2026-10-30 17:03:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T17:03:46Z.

Review: APPROVED


Re-checked — new head, looks good

The updated description records #11104 as the prerequisite, and the debt entry now identifies the firmware-13.42 evidence and its limits.

Reviewed head 071f80c6efb814cb39c34109360cb25188ef176e against PR base 9304896d89f070f65b8f38bd3a8024d5c19f8fe1; the current-main preview against a026562629da7bcc7af781639a11ab0647a524dd is clean. Diff, conventions, and stack checks passed. #11104 remains open at 9e5738a59f6a5c209015b6a964aac0786348dcbd; its head is not included here and the branches share the test and debt files. The author has recorded that this PR lands second and will rebase after #11104 merges; I have not asked for an early rebase. Approval applies to this exact head, and the rebased head will need a fresh check.

The aggregate precheck's ABI and test-quality helpers were unavailable in its isolated snapshot. The author reports the focused Windows tests and validation-layer checks pass; the code and test files are unchanged from the previously reviewed implementation. I did not build or run C++ tests or reproduce firmware results locally. Hosted checks were queued at final refresh.

Source: updated firmware evidence note at this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5715824549 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13471#pullrequestreview-5715824549). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T17:03:46Z. **Review:** APPROVED --- # Re-checked — new head, looks good The updated description records `#11104` as the prerequisite, and the debt entry now identifies the firmware-13.42 evidence and its limits. Reviewed head `071f80c6efb814cb39c34109360cb25188ef176e` against PR base `9304896d89f070f65b8f38bd3a8024d5c19f8fe1`; the current-main preview against `a026562629da7bcc7af781639a11ab0647a524dd` is clean. Diff, conventions, and stack checks passed. `#11104` remains open at `9e5738a59f6a5c209015b6a964aac0786348dcbd`; its head is not included here and the branches share the test and debt files. The author has recorded that this PR lands second and will rebase after `#11104` merges; I have not asked for an early rebase. Approval applies to this exact head, and the rebased head will need a fresh check. The aggregate precheck's ABI and test-quality helpers were unavailable in its isolated snapshot. The author reports the focused Windows tests and validation-layer checks pass; the code and test files are unchanged from the previously reviewed implementation. I did not build or run C++ tests or reproduce firmware results locally. Hosted checks were queued at final refresh. Source: [updated firmware evidence note at this head](https://github.com/boykopovar/AnyPS5/blob/071f80c6efb814cb39c34109360cb25188ef176e/docs/dev/debt/libSceAgcDriver.md#L21).
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!13471
No description provided.