feat(libSceAgcVsh): implement exports through shared libSceAgc sources #13940

Merged
akkadbakkad89 merged 1 commit from upstream-pr/13940 into main 2026-11-07 06:50:51 +00:00
akkadbakkad89 commented 2026-10-31 13:15:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-31T13:15:01Z.


What

Implements libSceAgcVsh by compiling the verified libSceAgc implementation sources into the module, replacing the 150 throwing stubs added in #11971.

Evidence basis (firmware 4.03 libSceAgcVsh.sprx vs libSceAgc.sprx, per-export body comparison through the modules' NID symtabs):

  • 95 of the 150 stub names are byte-identical bodies, 23 more are instruction-identical after normalizing relocation displacements and module-relative call targets — 118 verified same-contract exports wired to the shared implementations.
  • 24 exports are deliberate firmware trap bodies in Vsh (reporter call + int 0x41, 0x2b bytes). 22 of them live in implementation files alongside exports the module does serve, so the working bodies link in — a console traps when they are called through Vsh, which no running title can depend on; the divergence is recorded in the debt file.
  • The 8 size-different bodies (sceAgcInit, sceAgcGetRegisterDefaults2[Internal], sceAgcAcbAcquireMemGetSize, sceAgcCreateShader, sceAgcCbReleaseMem, sceAgcDcbAcquireMem, sceAgcLinkShaders) were decoded to the same contract; the apparent LinkShaders 0x3a0/0x3a4 difference is a branch-displacement target, not a struct size.
  • sceAgcAcbAtomicGds links the real Acb/src/Control.cpp implementation compiled into the module (its firmware Vsh body is the trap; recorded in the debt file, which keeps it with the other trap-bodied exports wired to working bodies). sceAgcSuspendPointAndCheckStatus stays a NotImplemented_nid_no_patch stub, matching its firmware trap body (no verified signature).

The unversioned sceAgcGetFusedShaderSize (nQT5kYLv0cg, exported by both modules) comes from #8314's firmware-exact body in the shared Misc/src/ShaderFusion.cpp: it validates a GsFront/GsBack or HsFront/HsBack half pair and returns back->num_sh_registers * 8 bytes aligned to 4, 0x8a6c0008 (GRAPHICS5_ERROR_INVALID_SHADER_HALVES) on a mismatched pair — the pre-geometry ABI the _0080 variant extends. The Vsh body was decoded independently here and matches; the testUnversionedSize block in the fusion test pins the contract (also that the size ignores the front half's register list).

Result: 288 exports, 211 of the 225 firmware-export NIDs resolve to implementations; the remaining 14 are 9 body-less symbols, 3 unnamed real bodies and 2 unnamed traps (recorded in docs/dev/debt/libSceAgcVsh.md).

Tested

Windows 11, MinGW build. libSceAgcVsh.prx links and its export table was diffed NID-by-NID against the firmware module's (211/225, no duplicate NIDs; cduV1f0dcGQ resolves through the compiled-in sceAgcAcbAtomicGds, the retained stub resolves b+fis+WZ3Ig). testUnversionedSize covers the GS/HS pair validation, register-list size/alignment, front-count invariance, and the swapped/mismatched-half rejections of the plain fused-size export.

ctest -R the 22 export-level AGC tests (agc_initialization through agc_gs_prim_payload_tests) plus agc_shader_fusion under ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on main and on this change: all pass on both sides; loader output confirms VK_LAYER_KHRONOS_validation inserted (no was not found but was requested), and neither log contains VUID- lines.

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: #8314 — its sceAgcGetFusedShaderSize and sceAgcAcbAtomicGds bodies are compiled into this module through the shared sources, so stacking on it keeps a single definition of each NID. Supersedes the throwing declarations of #11971 for the 149 exports now implemented; the stub export it added for sceAgcSuspendPointAndCheckStatus remains here
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3070 (driver 617.42), Windows 11 — the focused AGC tests above
  • AI-assisted: yes

Generated with Devin

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5097829205 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-31T13:15:01Z. --- ### What Implements `libSceAgcVsh` by compiling the verified `libSceAgc` implementation sources into the module, replacing the 150 throwing stubs added in #11971. Evidence basis (firmware 4.03 `libSceAgcVsh.sprx` vs `libSceAgc.sprx`, per-export body comparison through the modules' NID symtabs): - 95 of the 150 stub names are byte-identical bodies, 23 more are instruction-identical after normalizing relocation displacements and module-relative call targets — 118 verified same-contract exports wired to the shared implementations. - 24 exports are deliberate firmware *trap* bodies in Vsh (reporter call + `int 0x41`, 0x2b bytes). 22 of them live in implementation files alongside exports the module does serve, so the working bodies link in — a console traps when they are called through Vsh, which no running title can depend on; the divergence is recorded in the debt file. - The 8 size-different bodies (`sceAgcInit`, `sceAgcGetRegisterDefaults2[Internal]`, `sceAgcAcbAcquireMemGetSize`, `sceAgcCreateShader`, `sceAgcCbReleaseMem`, `sceAgcDcbAcquireMem`, `sceAgcLinkShaders`) were decoded to the same contract; the apparent `LinkShaders` `0x3a0`/`0x3a4` difference is a branch-displacement target, not a struct size. - `sceAgcAcbAtomicGds` links the real `Acb/src/Control.cpp` implementation compiled into the module (its firmware Vsh body is the trap; recorded in the debt file, which keeps it with the other trap-bodied exports wired to working bodies). `sceAgcSuspendPointAndCheckStatus` stays a `NotImplemented_nid_no_patch` stub, matching its firmware trap body (no verified signature). The unversioned `sceAgcGetFusedShaderSize` (`nQT5kYLv0cg`, exported by both modules) comes from #8314's firmware-exact body in the shared `Misc/src/ShaderFusion.cpp`: it validates a `GsFront`/`GsBack` or `HsFront`/`HsBack` half pair and returns `back->num_sh_registers * 8` bytes aligned to 4, `0x8a6c0008` (`GRAPHICS5_ERROR_INVALID_SHADER_HALVES`) on a mismatched pair — the pre-geometry ABI the `_0080` variant extends. The Vsh body was decoded independently here and matches; the `testUnversionedSize` block in the fusion test pins the contract (also that the size ignores the front half's register list). Result: 288 exports, 211 of the 225 firmware-export NIDs resolve to implementations; the remaining 14 are 9 body-less symbols, 3 unnamed real bodies and 2 unnamed traps (recorded in `docs/dev/debt/libSceAgcVsh.md`). ### 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, MinGW build. `libSceAgcVsh.prx` links and its export table was diffed NID-by-NID against the firmware module's (211/225, no duplicate NIDs; `cduV1f0dcGQ` resolves through the compiled-in `sceAgcAcbAtomicGds`, the retained stub resolves `b+fis+WZ3Ig`). `testUnversionedSize` covers the GS/HS pair validation, register-list size/alignment, front-count invariance, and the swapped/mismatched-half rejections of the plain fused-size export. `ctest -R` the 22 export-level AGC tests (`agc_initialization` through `agc_gs_prim_payload_tests`) plus `agc_shader_fusion` under `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on `main` and on this change: all pass on both sides; loader output confirms `VK_LAYER_KHRONOS_validation` inserted (no `was not found but was requested`), and neither log contains `VUID-` lines. ### 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: #8314 — its `sceAgcGetFusedShaderSize` and `sceAgcAcbAtomicGds` bodies are compiled into this module through the shared sources, so stacking on it keeps a single definition of each NID. Supersedes the throwing declarations of #11971 for the 149 exports now implemented; the stub export it added for `sceAgcSuspendPointAndCheckStatus` remains here - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3070 (driver 617.42), Windows 11 — the focused AGC tests above - [x] AI-assisted: yes Generated with [Devin](https://devin.ai)
MarcZX10 commented 2026-10-31 13:22:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T13:22:55Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The new library debt file has four entries that do not link to a core/ path, so the repository convention check rejects them.

What I ran

Reviewed head da820c49e59348589b8c65a3ec5a01a5a203afea against base cd087bd12c258cf6dbb82e203bafd20d9fe2596c; the individual merge preview is clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or CTest was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940
git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...da820c49e59348589b8c65a3ec5a01a5a203afea
python3 tools/check_conventions.py --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head da820c49e59348589b8c65a3ec5a01a5a203afea --title 'feat(libSceAgcVsh): implement exports through shared libSceAgc sources' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13940-da820c49e593/pr-body.md

Results

Check Result
Patch whitespace Passed
Conventions and PR template Failed on four debt-file entries, lines 6–9
Merge preview Clean against the recorded base
Windows hosted check In progress at final snapshot
Linux and specialized hosted jobs Skipped
Build and CTest Not run locally
Conventions output
docs/dev/debt/libSceAgcVsh.md:6: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md
docs/dev/debt/libSceAgcVsh.md:7: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md
docs/dev/debt/libSceAgcVsh.md:8: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md
docs/dev/debt/libSceAgcVsh.md:9: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md
4 findings, 4 errors; GitHub shows at most 10 error annotations, the job summary lists all

Findings

Blocking

The four bullets on lines 6–9 of docs/dev/debt/libSceAgcVsh.md have no link to a core/ path. The convention checker therefore classifies them as general debt that belongs in docs/dev/TechnicalDebt.md, and the hosted conventions check fails. Add a relevant core/libs/prx/libSceAgcVsh/... link to each entry, or move entries that are not specific to this library into the index.

Non-blocking

The precheck's ABI and test-quality helper invocations could not run from its isolated checkout because those local helper scripts are not part of the PR. I ran the ABI audit from this workspace; it reports 148 removed stub declarations, which this PR explicitly replaces with shared implementations, so it does not independently establish the resulting runtime export table. The test-quality heuristic's source-registration warning is not conclusive; the CMake target includes tests/Recorder.cpp.

Not verified

I did not build the module, run CTest, or independently reproduce the firmware body comparison or the author-reported Windows test results. The Windows hosted check was still in progress; Linux and specialized jobs were skipped.

To get this to a good state

Link or relocate the four debt entries, then rerun the conventions check. I will rerun the same no-build checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722878754 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940#pullrequestreview-5722878754). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T13:22:55Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The new library debt file has four entries that do not link to a `core/` path, so the repository convention check rejects them. ## What I ran Reviewed head `da820c49e59348589b8c65a3ec5a01a5a203afea` against base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`; the individual merge preview is clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or CTest was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940 git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...da820c49e59348589b8c65a3ec5a01a5a203afea python3 tools/check_conventions.py --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head da820c49e59348589b8c65a3ec5a01a5a203afea --title 'feat(libSceAgcVsh): implement exports through shared libSceAgc sources' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13940-da820c49e593/pr-body.md ``` ## Results | Check | Result | |---|---| | Patch whitespace | Passed | | Conventions and PR template | Failed on four debt-file entries, lines 6–9 | | Merge preview | Clean against the recorded base | | Windows hosted check | In progress at final snapshot | | Linux and specialized hosted jobs | Skipped | | Build and CTest | Not run locally | <details><summary>Conventions output</summary> ```text docs/dev/debt/libSceAgcVsh.md:6: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md docs/dev/debt/libSceAgcVsh.md:7: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md docs/dev/debt/libSceAgcVsh.md:8: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md docs/dev/debt/libSceAgcVsh.md:9: error: [debt-file] Technical debt about one library or component goes in docs/dev/debt/<name>.md, named after the first core/ path it links: <library> for core/libs/prx/<library>, otherwise <component> for core/<component>; entries that link neither stay in docs/dev/TechnicalDebt.md: docs/dev/TechnicalDebt.md 4 findings, 4 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` </details> ## Findings ### Blocking The four bullets on lines 6–9 of `docs/dev/debt/libSceAgcVsh.md` have no link to a `core/` path. The convention checker therefore classifies them as general debt that belongs in `docs/dev/TechnicalDebt.md`, and the hosted conventions check fails. Add a relevant `core/libs/prx/libSceAgcVsh/...` link to each entry, or move entries that are not specific to this library into the index. ### Non-blocking The precheck's ABI and test-quality helper invocations could not run from its isolated checkout because those local helper scripts are not part of the PR. I ran the ABI audit from this workspace; it reports 148 removed stub declarations, which this PR explicitly replaces with shared implementations, so it does not independently establish the resulting runtime export table. The test-quality heuristic's source-registration warning is not conclusive; the CMake target includes `tests/Recorder.cpp`. ## Not verified I did not build the module, run CTest, or independently reproduce the firmware body comparison or the author-reported Windows test results. The Windows hosted check was still in progress; Linux and specialized jobs were skipped. ## To get this to a good state Link or relocate the four debt entries, then rerun the conventions check. I will rerun the same no-build checks on the updated head.
MarcZX10 commented 2026-11-01 09:48:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:48:26Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The unversioned sceAgcGetFusedShaderSize implementation overlaps #8314, and combining the two current heads produces duplicate definitions with different behavior.

What I ran

Reviewed PR head 530320f90cd53b00a1b6a55148543cc6e97f06e2 against PR base cd087bd12c258cf6dbb82e203bafd20d9fe2596c; the PR merges cleanly onto current main 1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba. The pairwise preview with #8314 also merges textually cleanly, but the resulting source has duplicate definitions. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was used.

git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...530320f90cd53b00a1b6a55148543cc6e97f06e2
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940
python3 tools/check_conventions.py --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head 530320f90cd53b00a1b6a55148543cc6e97f06e2 --title 'feat(libSceAgcVsh): implement exports through shared libSceAgc sources' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13940-530320f90cd5/pr-body.md
python3 tools/pr_abi_audit.py --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head 530320f90cd53b00a1b6a55148543cc6e97f06e2
git merge-tree --write-tree 1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba refs/review/13940-current
git merge-tree --write-tree refs/review/13940-current refs/review/8314-live
git show 8735f78ce1645000f450068c5ff4bad240ee98c4:core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp | grep -n 'int APS5_VABI sceAgcGetFusedShaderSize(SizeAlign'
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceAgc/Misc/include/ShaderFusion.hpp core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp core/libs/prx/libSceAgc/tests/ShaderFusion.cpp core/libs/prx/libSceAgcVsh/CMakeLists.txt core/libs/prx/libSceAgcVsh/Export.cpp core/libs/prx/libSceAgcVsh/include/Api.hpp core/libs/prx/libSceAgcVsh/libSceAgcVsh.hpp docs/dev/debt/libSceAgcVsh.md

The precheck's isolated checkout lacked the workspace-only ABI and test-quality helper scripts; I therefore ran those helpers directly above. Hosted CI was refreshed on this exact head.

Results

Check Result
Patch whitespace Passed; exit status 0, no output.
Conventions and PR template Passed with one non-blocking debt-length warning (1,276 characters; zero errors).
ABI audit passed_with_warnings; the lexical audit flags removed _nid_no_patch names that this PR replaces with implementations; it does not verify the linked export table or binary ABI.
Test registration The quality heuristic flagged ShaderFusion.cpp as possibly unregistered; source inspection confirmed agc_shader_fusion_tests and agc_shader_fusion are explicitly registered in core/libs/prx/libSceAgc/CMakeLists.txt.
Current-main merge preview Clean for #13940 onto main 1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba.
#13940 + #8314 integration preview Git reports a clean pairwise merge, but the merged source contains two definitions of sceAgcGetFusedShaderSize; see blocking finding.
Hosted CI Windows, conventions, eligibility, labels, library portability, and report passed. Linux and specialized jobs were skipped.
Author-provided GPU report The author attached a separate NVIDIA run reporting 1,058 passed, two failures also present on main, and nine skipped; I did not reproduce that build or run.
Selected raw output

Conventions:

docs/dev/debt/libSceAgcVsh.md:10: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1276 characters
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all

Test-quality heuristic:

{
  "findings": [
    {
      "path": "core/libs/prx/libSceAgc/tests/ShaderFusion.cpp",
      "line": 1,
      "kind": "possible-unregistered-cpp-test",
      "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
    }
  ],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}

Pairwise merged source:

372:int APS5_VABI sceAgcGetFusedShaderSize(SizeAlign* dst, const Shader* front, const Shader* back) {
388:int APS5_VABI sceAgcGetFusedShaderSize(SizeAlign* dst, const Shader* front, const Shader* back) {

Findings

Blocking

#8314 also defines the unversioned export in core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp. In the combined tree, this PR's body returns back->num_sh_registers * 8 and writes all of m_align; #8314's body forwards to _0080 and writes only the low dword of m_align. The clean textual merge therefore leaves duplicate C++ definitions and competing firmware behavior. The current checklist says Depends on: none, while the repository requires authors of overlapping exports to agree on landing order and declare the dependency. Please coordinate with #8314's author, settle which behavior and single definition should remain, and update this PR's dependency declaration accordingly.

Non-blocking

The only convention output is a debt-entry length warning. The automated test-quality warning is a false positive; the test is registered in CMake.

Sources

Not verified

I did not configure or build AnyPS5, run CTest, verify the linked export table, reproduce the firmware disassembly comparison, or test on a PS5 console. Linux and specialized hosted CI jobs were skipped. The NVIDIA build and tests are author-provided evidence, not a local run.

To get this to a good state

Coordinate with #8314's author, retain one agreed implementation of the shared export, update Depends on to reflect the agreed landing order, and push a new head. I will rerun these no-build checks and review the updated integration preview.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727266846 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940#pullrequestreview-5727266846). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T09:48:26Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The unversioned `sceAgcGetFusedShaderSize` implementation overlaps #8314, and combining the two current heads produces duplicate definitions with different behavior. ## What I ran Reviewed PR head `530320f90cd53b00a1b6a55148543cc6e97f06e2` against PR base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`; the PR merges cleanly onto current `main` `1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba`. The pairwise preview with #8314 also merges textually cleanly, but the resulting source has duplicate definitions. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was used. ```sh git diff --check cd087bd12c258cf6dbb82e203bafd20d9fe2596c...530320f90cd53b00a1b6a55148543cc6e97f06e2 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940 python3 tools/check_conventions.py --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head 530320f90cd53b00a1b6a55148543cc6e97f06e2 --title 'feat(libSceAgcVsh): implement exports through shared libSceAgc sources' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13940-530320f90cd5/pr-body.md python3 tools/pr_abi_audit.py --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head 530320f90cd53b00a1b6a55148543cc6e97f06e2 git merge-tree --write-tree 1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba refs/review/13940-current git merge-tree --write-tree refs/review/13940-current refs/review/8314-live git show 8735f78ce1645000f450068c5ff4bad240ee98c4:core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp | grep -n 'int APS5_VABI sceAgcGetFusedShaderSize(SizeAlign' python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceAgc/Misc/include/ShaderFusion.hpp core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp core/libs/prx/libSceAgc/tests/ShaderFusion.cpp core/libs/prx/libSceAgcVsh/CMakeLists.txt core/libs/prx/libSceAgcVsh/Export.cpp core/libs/prx/libSceAgcVsh/include/Api.hpp core/libs/prx/libSceAgcVsh/libSceAgcVsh.hpp docs/dev/debt/libSceAgcVsh.md ``` The precheck's isolated checkout lacked the workspace-only ABI and test-quality helper scripts; I therefore ran those helpers directly above. Hosted CI was refreshed on this exact head. ## Results | Check | Result | |---|---| | Patch whitespace | Passed; exit status 0, no output. | | Conventions and PR template | Passed with one non-blocking debt-length warning (1,276 characters; zero errors). | | ABI audit | `passed_with_warnings`; the lexical audit flags removed `_nid_no_patch` names that this PR replaces with implementations; it does not verify the linked export table or binary ABI. | | Test registration | The quality heuristic flagged `ShaderFusion.cpp` as possibly unregistered; source inspection confirmed `agc_shader_fusion_tests` and `agc_shader_fusion` are explicitly registered in `core/libs/prx/libSceAgc/CMakeLists.txt`. | | Current-main merge preview | Clean for #13940 onto `main` `1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba`. | | #13940 + #8314 integration preview | Git reports a clean pairwise merge, but the merged source contains two definitions of `sceAgcGetFusedShaderSize`; see blocking finding. | | Hosted CI | Windows, conventions, eligibility, labels, library portability, and report passed. Linux and specialized jobs were skipped. | | Author-provided GPU report | The author attached a separate NVIDIA run reporting 1,058 passed, two failures also present on `main`, and nine skipped; I did not reproduce that build or run. | <details><summary>Selected raw output</summary> Conventions: ```text docs/dev/debt/libSceAgcVsh.md:10: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1276 characters 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` Test-quality heuristic: ```json { "findings": [ { "path": "core/libs/prx/libSceAgc/tests/ShaderFusion.cpp", "line": 1, "kind": "possible-unregistered-cpp-test", "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage." } ], "negative_control_candidates": [], "limits": [ "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.", "A test that passes against base is not by itself proof that the PR test is inadequate.", "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error." ] } ``` Pairwise merged source: ```text 372:int APS5_VABI sceAgcGetFusedShaderSize(SizeAlign* dst, const Shader* front, const Shader* back) { 388:int APS5_VABI sceAgcGetFusedShaderSize(SizeAlign* dst, const Shader* front, const Shader* back) { ``` </details> ## Findings ### Blocking #8314 also defines the unversioned export in `core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp`. In the combined tree, this PR's body returns `back->num_sh_registers * 8` and writes all of `m_align`; #8314's body forwards to `_0080` and writes only the low dword of `m_align`. The clean textual merge therefore leaves duplicate C++ definitions and competing firmware behavior. The current checklist says `Depends on: none`, while the repository requires authors of overlapping exports to agree on landing order and declare the dependency. Please coordinate with #8314's author, settle which behavior and single definition should remain, and update this PR's dependency declaration accordingly. ### Non-blocking The only convention output is a debt-entry length warning. The automated test-quality warning is a false positive; the test is registered in CMake. ## Sources - [This PR's implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/530320f90cd53b00a1b6a55148543cc6e97f06e2/core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp#L372-L377) - [#8314's implementation at its current head](https://github.com/boykopovar/AnyPS5/blob/5f49471699944b41441291d3285360a20183edd2/core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp#L380-L388) - [Repository overlap and dependency rule at current `main`](https://github.com/boykopovar/AnyPS5/blob/1f2c1da1fbc2e455b921616cdacb5a714d7fe7ba/CONTRIBUTING.md#L70) - [Author-provided NVIDIA report for this head](https://github.com/boykopovar/AnyPS5/pull/13940#issuecomment-6545262422) - [Hosted CI run for this head](https://github.com/boykopovar/AnyPS5/actions/runs/41212048461) ## Not verified I did not configure or build AnyPS5, run CTest, verify the linked export table, reproduce the firmware disassembly comparison, or test on a PS5 console. Linux and specialized hosted CI jobs were skipped. The NVIDIA build and tests are author-provided evidence, not a local run. ## To get this to a good state Coordinate with #8314's author, retain one agreed implementation of the shared export, update `Depends on` to reflect the agreed landing order, and push a new head. I will rerun these no-build checks and review the updated integration preview.
MarcZX10 commented 2026-11-01 09:48:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:48:57Z.

Review: COMMENTED


Re-checked — new head, no blocking findings

The four debt-file entries that failed the conventions check now link to core/ paths at 530320f90c, and the change since da820c49e5 adds only a test assertion and debt text.

What I ran

  • Head 530320f90cd53b00a1b6a55148543cc6e97f06e2, previous reviewed head da820c49e59348589b8c65a3ec5a01a5a203afea. Base cd087bd12c258cf6dbb82e203bafd20d9fe2596c. The live check reports the PR as mergeable; no separate merged-preview was built for this comment.
  • No build, configure, compile or CTest run. Commands, from /marc/AnyPS5:
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940
git diff da820c49e5 530320f90c -- core/libs/prx/libSceAgc/tests/ShaderFusion.cpp docs/dev/debt/libSceAgcVsh.md
git diff --stat cd087bd12c258cf6dbb82e203bafd20d9fe2596c...530320f90c
python3 tools/pr_abi_audit.py --repo . --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head 530320f90cd53b00a1b6a55148543cc6e97f06e2 --json
python3 tools/pr_test_quality.py --root <git archive of core/libs/prx/libSceAgc and core/libs/prx/libSceAgcVsh at 530320f90c> --json core/libs/prx/libSceAgc/tests/ShaderFusion.cpp

The precheck's ABI and test-quality helpers failed because the head tree has no tools/ directory, so both were run by hand as above.

Results

Check Result
Diff check Passed (precheck)
Conventions and PR template Passed at 530320f90c (precheck), with one warning: docs/dev/debt/libSceAgcVsh.md:10 is 1276 characters (debt-length)
Live dependency and mergeability Passed (precheck)
ABI audit (manual) passed_with_warnings: 155 symbols and 148 lexical export-removed findings. These match the PR's stated move of the stub declarations to shared implementations. The audit cannot confirm the runtime export table.
Test-quality heuristic (manual) One possible-unregistered-cpp-test on ShaderFusion.cpp. False positive: core/libs/prx/libSceAgc/CMakeLists.txt line 307 registers tests/ShaderFusion.cpp as agc_shader_fusion_tests. The heuristic searched for the full repository path.
Hosted CI at 530320f90c conventions, windows, library-portability, eligibility, labels and report succeeded. linux, relinker, relinker-asan, write-watch and register-context were skipped.
Build and C++ tests Not run (no-build rule)
Delta since da820c49e5, unedited git diff output (test and debt file)
@@ -325,6 +325,8 @@ void testUnversionedSize() {
     SizeAlign size{};
     check(sceAgcGetFusedShaderSize(&size, &halves.front, &halves.back) == 0, "unversioned fused size query failed");
     check(size.m_size == halves.back.num_sh_registers * sizeof(ShaderRegister) && size.m_align == 4, "unversioned fused size did not cover the back half's register list");
+    SizeAlign merged{};
+    check(sceAgcGetFusedShaderSize_0080(&merged, &halves.front, &halves.back) == 0 && merged.m_size != size.m_size, "unversioned size matched the _0080 merged geometry size");
     check(sceAgcGetFusedShaderSize(&size, &halves.back, &halves.front) == InvalidShaderHalves, "unversioned query accepted swapped halves");

Findings

Blocking: none.

Non-blocking:

  1. Line 10 of docs/dev/debt/libSceAgcVsh.md is over the 1000-character debt-entry limit. The conventions result is a warning, not an error. Shortening that entry would clear it.
  2. The export-count, firmware-hash and body-comparison figures in the debt entries are the author's report from a firmware analysis. The firmware file is not in this repository, so I did not reproduce them.
  3. The new assertion at line 329 expects sceAgcGetFusedShaderSize_0080 and the unversioned size to differ for a GsFront/GsBack pair. The test's Halves constructor sets GsFront at line 103, so the assertion does reach the geometry branch. I did not run it. The hosted Windows success does not show which tests that job ran.

Sources

Not verified

  • No build and no CTest. The new ShaderFusion assertion and the rest of that test file were not run at this head.
  • The export count (300 against 225), the firmware SHA-256 and the 118-body comparison were not reproduced; they need the firmware module.
  • Export.cpp, CMakeLists.txt and the 48 shared files linked into libSceAgcVsh were not re-read line by line in this pass. The delta since da820c49e5 does not touch them. This comment is a re-check of the conventions result, the hosted results and that delta, not a full review of the implementation.
  • The hosted Windows success does not show which tests ran.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727268589 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940#pullrequestreview-5727268589). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T09:48:57Z. **Review:** COMMENTED --- # Re-checked — new head, no blocking findings The four debt-file entries that failed the conventions check now link to `core/` paths at `530320f90c`, and the change since `da820c49e5` adds only a test assertion and debt text. ## What I ran - Head `530320f90cd53b00a1b6a55148543cc6e97f06e2`, previous reviewed head `da820c49e59348589b8c65a3ec5a01a5a203afea`. Base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`. The live check reports the PR as mergeable; no separate merged-preview was built for this comment. - No build, configure, compile or CTest run. Commands, from `/marc/AnyPS5`: ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940 git diff da820c49e5 530320f90c -- core/libs/prx/libSceAgc/tests/ShaderFusion.cpp docs/dev/debt/libSceAgcVsh.md git diff --stat cd087bd12c258cf6dbb82e203bafd20d9fe2596c...530320f90c python3 tools/pr_abi_audit.py --repo . --base cd087bd12c258cf6dbb82e203bafd20d9fe2596c --head 530320f90cd53b00a1b6a55148543cc6e97f06e2 --json python3 tools/pr_test_quality.py --root <git archive of core/libs/prx/libSceAgc and core/libs/prx/libSceAgcVsh at 530320f90c> --json core/libs/prx/libSceAgc/tests/ShaderFusion.cpp ``` The precheck's ABI and test-quality helpers failed because the head tree has no `tools/` directory, so both were run by hand as above. ## Results | Check | Result | |---|---| | Diff check | Passed (precheck) | | Conventions and PR template | Passed at `530320f90c` (precheck), with one warning: `docs/dev/debt/libSceAgcVsh.md:10` is 1276 characters (`debt-length`) | | Live dependency and mergeability | Passed (precheck) | | ABI audit (manual) | `passed_with_warnings`: 155 symbols and 148 lexical `export-removed` findings. These match the PR's stated move of the stub declarations to shared implementations. The audit cannot confirm the runtime export table. | | Test-quality heuristic (manual) | One `possible-unregistered-cpp-test` on `ShaderFusion.cpp`. False positive: `core/libs/prx/libSceAgc/CMakeLists.txt` line 307 registers `tests/ShaderFusion.cpp` as `agc_shader_fusion_tests`. The heuristic searched for the full repository path. | | Hosted CI at `530320f90c` | `conventions`, `windows`, `library-portability`, `eligibility`, `labels` and `report` succeeded. `linux`, `relinker`, `relinker-asan`, `write-watch` and `register-context` were skipped. | | Build and C++ tests | Not run (no-build rule) | <details><summary>Delta since da820c49e5, unedited git diff output (test and debt file)</summary> ```text @@ -325,6 +325,8 @@ void testUnversionedSize() { SizeAlign size{}; check(sceAgcGetFusedShaderSize(&size, &halves.front, &halves.back) == 0, "unversioned fused size query failed"); check(size.m_size == halves.back.num_sh_registers * sizeof(ShaderRegister) && size.m_align == 4, "unversioned fused size did not cover the back half's register list"); + SizeAlign merged{}; + check(sceAgcGetFusedShaderSize_0080(&merged, &halves.front, &halves.back) == 0 && merged.m_size != size.m_size, "unversioned size matched the _0080 merged geometry size"); check(sceAgcGetFusedShaderSize(&size, &halves.back, &halves.front) == InvalidShaderHalves, "unversioned query accepted swapped halves"); ``` </details> ## Findings **Blocking:** none. **Non-blocking:** 1. Line 10 of `docs/dev/debt/libSceAgcVsh.md` is over the 1000-character debt-entry limit. The conventions result is a warning, not an error. Shortening that entry would clear it. 2. The export-count, firmware-hash and body-comparison figures in the debt entries are the author's report from a firmware analysis. The firmware file is not in this repository, so I did not reproduce them. 3. The new assertion at line 329 expects `sceAgcGetFusedShaderSize_0080` and the unversioned size to differ for a GsFront/GsBack pair. The test's `Halves` constructor sets `GsFront` at line 103, so the assertion does reach the geometry branch. I did not run it. The hosted Windows success does not show which tests that job ran. ## Sources - Test halves are GsFront at this head: https://github.com/boykopovar/AnyPS5/blob/530320f90cd53b00a1b6a55148543cc6e97f06e2/core/libs/prx/libSceAgc/tests/ShaderFusion.cpp#L103 - New assertion at this head: https://github.com/boykopovar/AnyPS5/blob/530320f90cd53b00a1b6a55148543cc6e97f06e2/core/libs/prx/libSceAgc/tests/ShaderFusion.cpp#L329 - Unversioned size has no geometry branch at this head: https://github.com/boykopovar/AnyPS5/blob/530320f90cd53b00a1b6a55148543cc6e97f06e2/core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp#L372-L378 - Test registration at this head: https://github.com/boykopovar/AnyPS5/blob/530320f90cd53b00a1b6a55148543cc6e97f06e2/core/libs/prx/libSceAgc/CMakeLists.txt#L307 ## Not verified - No build and no CTest. The new `ShaderFusion` assertion and the rest of that test file were not run at this head. - The export count (300 against 225), the firmware SHA-256 and the 118-body comparison were not reproduced; they need the firmware module. - `Export.cpp`, `CMakeLists.txt` and the 48 shared files linked into `libSceAgcVsh` were not re-read line by line in this pass. The delta since `da820c49e5` does not touch them. This comment is a re-check of the conventions result, the hosted results and that delta, not a full review of the implementation. - The hosted Windows success does not show which tests ran.
adriadam10 commented 2026-11-01 11:47:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-01T11:47:17Z.

Review: CHANGES_REQUESTED


Checked the source list against libSceAgc's, the new test (it pins size != _0080 and the dword m_align store) and the earlier reviewers' points; those are addressed. One thing blocks the merge:

  • sceAgcGetFusedShaderSize is also defined by #8314 (Misc/src/ShaderFusion.cpp, forwarding to _0080), and Depends on still says none. Whichever lands second leaves two definitions and breaks the build. Your decode of the 4.03 body (no call, back->num_sh_registers * 8, dword m_align) says this PR's body is the firmware-exact one, so please agree with the #8314 author on a single definition (e.g. #8314 lands first and this PR replaces its body, or #8314 drops its alias) and list #8314 in Depends on.
  • #8314 also adds a real sceAgcAcbAtomicGds (cduV1f0dcGQ) in Acb/src/Control.cpp, which this module compiles in. core/libs/prx/libSceAgcVsh/Export.cpp:4 still exports cduV1f0dcGQ as a stub, so once #8314 is in the NID is exported twice (the Windows patcher rejects that). Decide which one the module keeps and update the stub and the debt entry for it.

Rebase on top of #8314 once settled; the rest looks fine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727895588 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940#pullrequestreview-5727895588). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-11-01T11:47:17Z. **Review:** CHANGES_REQUESTED --- Checked the source list against `libSceAgc`'s, the new test (it pins `size != _0080` and the dword `m_align` store) and the earlier reviewers' points; those are addressed. One thing blocks the merge: - `sceAgcGetFusedShaderSize` is also defined by #8314 (`Misc/src/ShaderFusion.cpp`, forwarding to `_0080`), and `Depends on` still says none. Whichever lands second leaves two definitions and breaks the build. Your decode of the 4.03 body (no call, `back->num_sh_registers * 8`, dword `m_align`) says this PR's body is the firmware-exact one, so please agree with the #8314 author on a single definition (e.g. #8314 lands first and this PR replaces its body, or #8314 drops its alias) and list #8314 in `Depends on`. - #8314 also adds a real `sceAgcAcbAtomicGds` (`cduV1f0dcGQ`) in `Acb/src/Control.cpp`, which this module compiles in. `core/libs/prx/libSceAgcVsh/Export.cpp:4` still exports `cduV1f0dcGQ` as a stub, so once #8314 is in the NID is exported twice (the Windows patcher rejects that). Decide which one the module keeps and update the stub and the debt entry for it. Rebase on top of #8314 once settled; the rest looks fine.
MarcZX10 commented 2026-11-01 19:59:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:59:04Z.

Review: APPROVED


Reviewed — looks good

I reviewed head b289ddc966ec47a1dec1f0487e90099a332ed814 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; I found no blocking issue, and the required hosted checks completed successfully.

What I ran

Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not configure or build locally. The exact PR head and base were unchanged at the end. The PR and its declared dependency #8314 each preview cleanly against current main; the stack check confirms #8314's exact head is included in #13940.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940 --output-dir /tmp/anyps5-pr-precheck/13940-b289-20261101
git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...b289ddc966ec47a1dec1f0487e90099a332ed814
python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head b289ddc966ec47a1dec1f0487e90099a332ed814 --json
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceAgc/tests/AtomicGdsSize.cpp core/libs/prx/libSceAgc/tests/EndOfShaderActionSize.cpp core/libs/prx/libSceAgc/tests/ShaderFusion.cpp

The isolated precheck could not invoke the workspace-only ABI and test-quality helpers because those scripts are not in the PR snapshot. I ran both against the exact base/head from the review workspace and inspected their findings. I also read all 15 changed files, the current diff, dependency discussion, and hosted check conclusions.

Results

Check Result Note
Diff whitespace passed No patch errors.
Conventions and template passed One non-blocking debt-length warning.
ABI audit passed Heuristic removals are the stubs replaced by these implementations; it cannot certify a linked export table.
Test registration passed The three heuristic warnings are false positives; the AGC CMake file registers the tests.
Dependency previews passed #8314 → #13940; both exact heads preview cleanly.
Hosted checks passed Windows, conventions, eligibility, labels, portability and report passed; Linux and specialized jobs were skipped.
Local build and C++ tests not run Not part of the no-build initial review.
Negative control not run Requires running the C++ tests against a modified or reverted implementation.
Selected unedited check output

Precheck conventions output:

docs/dev/debt/libSceAgcVsh.md:10: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1275 characters
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all

Precheck ABI helper stderr (the helper was then run separately from the workspace):

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/13940-b289-20261101/head-b289ddc966ec-07888891/tools/pr_abi_audit.py': [Errno 2] No such file or directory

Precheck test-quality helper stderr (the helper was then run separately from the workspace):

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/13940-b289-20261101/head-b289ddc966ec-07888891/tools/pr_test_quality.py': [Errno 2] No such file or directory

Hosted check conclusions on the reviewed head:

register-context skipped
relinker skipped
linux skipped
relinker-asan skipped
write-watch skipped
windows success
labels success
conventions success
eligibility success
library-portability success
report success
conventions cancelled

Negative control

Not run: no safe no-build negative-control mechanism exists for these C++ tests; proving the new assertions fail requires building and running a modified test target.

Findings

Blocking

None found in the reviewed diff.

Non-blocking

The firmware body comparisons, Windows PRX export-table comparison, and GPU test results are described by the author; I did not independently reproduce them. The ABI audit is lexical and cannot verify the linked runtime export table. The debt entry at docs/dev/debt/libSceAgcVsh.md:10 exceeds the convention's preferred length, but the hosted conventions check reports it as a warning.

Sources

Not verified

I did not run a local build, CTest, the linked PRX export-table comparison, firmware disassembly comparison, or console tests. Linux and specialized hosted jobs were skipped. The GPU and firmware results in the PR description are author-reported evidence, not my runs.

To get this to a good state

No blocking change is needed for this review. If a new head changes the implementation, I will rerun the relevant no-build checks and review that head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729953982 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940#pullrequestreview-5729953982). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T19:59:04Z. **Review:** APPROVED --- # Reviewed — looks good I reviewed head `b289ddc966ec47a1dec1f0487e90099a332ed814` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; I found no blocking issue, and the required hosted checks completed successfully. ## What I ran Environment: Linux x86_64, Python 3.11.2, Git 2.39.5. I did not configure or build locally. The exact PR head and base were unchanged at the end. The PR and its declared dependency #8314 each preview cleanly against current `main`; the stack check confirms #8314's exact head is included in #13940. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13940 --output-dir /tmp/anyps5-pr-precheck/13940-b289-20261101 git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...b289ddc966ec47a1dec1f0487e90099a332ed814 python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head b289ddc966ec47a1dec1f0487e90099a332ed814 --json python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceAgc/tests/AtomicGdsSize.cpp core/libs/prx/libSceAgc/tests/EndOfShaderActionSize.cpp core/libs/prx/libSceAgc/tests/ShaderFusion.cpp ``` The isolated precheck could not invoke the workspace-only ABI and test-quality helpers because those scripts are not in the PR snapshot. I ran both against the exact base/head from the review workspace and inspected their findings. I also read all 15 changed files, the current diff, dependency discussion, and hosted check conclusions. ## Results | Check | Result | Note | |---|---|---| | Diff whitespace | passed | No patch errors. | | Conventions and template | passed | One non-blocking debt-length warning. | | ABI audit | passed | Heuristic removals are the stubs replaced by these implementations; it cannot certify a linked export table. | | Test registration | passed | The three heuristic warnings are false positives; the AGC CMake file registers the tests. | | Dependency previews | passed | #8314 → #13940; both exact heads preview cleanly. | | Hosted checks | passed | Windows, conventions, eligibility, labels, portability and report passed; Linux and specialized jobs were skipped. | | Local build and C++ tests | not run | Not part of the no-build initial review. | | Negative control | not run | Requires running the C++ tests against a modified or reverted implementation. | <details> <summary>Selected unedited check output</summary> Precheck conventions output: ```text docs/dev/debt/libSceAgcVsh.md:10: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1275 characters 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` Precheck ABI helper stderr (the helper was then run separately from the workspace): ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/13940-b289-20261101/head-b289ddc966ec-07888891/tools/pr_abi_audit.py': [Errno 2] No such file or directory ``` Precheck test-quality helper stderr (the helper was then run separately from the workspace): ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/13940-b289-20261101/head-b289ddc966ec-07888891/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` Hosted check conclusions on the reviewed head: ```text register-context skipped relinker skipped linux skipped relinker-asan skipped write-watch skipped windows success labels success conventions success eligibility success library-portability success report success conventions cancelled ``` </details> ## Negative control Not run: no safe no-build negative-control mechanism exists for these C++ tests; proving the new assertions fail requires building and running a modified test target. ## Findings ### Blocking None found in the reviewed diff. ### Non-blocking The firmware body comparisons, Windows PRX export-table comparison, and GPU test results are described by the author; I did not independently reproduce them. The ABI audit is lexical and cannot verify the linked runtime export table. The debt entry at `docs/dev/debt/libSceAgcVsh.md:10` exceeds the convention's preferred length, but the hosted conventions check reports it as a warning. ## Sources - [Unversioned fused-size implementation at this head](https://github.com/boykopovar/AnyPS5/blob/b289ddc966ec47a1dec1f0487e90099a332ed814/core/libs/prx/libSceAgc/Misc/src/ShaderFusion.cpp#L365-L372) - [DCB atomic GDS implementation at this head](https://github.com/boykopovar/AnyPS5/blob/b289ddc966ec47a1dec1f0487e90099a332ed814/core/libs/prx/libSceAgc/DcbFlow/src/Control.cpp#L15-L27) - [Unversioned fused-size assertions at this head](https://github.com/boykopovar/AnyPS5/blob/b289ddc966ec47a1dec1f0487e90099a332ed814/core/libs/prx/libSceAgc/tests/ShaderFusion.cpp#L328-L340) - [Dependency and overlap checklist rule at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/f2d874c1fdccf781c0fa5d86619bb5dd8894b958/CONTRIBUTING.md#L70-L86) - [Hosted checks for this head](https://github.com/boykopovar/AnyPS5/actions/runs/41323293286) ## Not verified I did not run a local build, CTest, the linked PRX export-table comparison, firmware disassembly comparison, or console tests. Linux and specialized hosted jobs were skipped. The GPU and firmware results in the PR description are author-reported evidence, not my runs. ## To get this to a good state No blocking change is needed for this review. If a new head changes the implementation, I will rerun the relevant no-build checks and review that head.
adriadam10 commented 2026-11-06 13:29:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-06T13:29:55Z.

Review: CHANGES_REQUESTED


Re-checked head 8bf5e05: the source list, the new test and the CI results are fine, but the point from the last review is still open, and the branch does not match the earlier comment.

  • This head does not contain #8314 (e79f6c1606/f2c1bf584a are not ancestors; the PR is 3 commits on top of main), yet it still defines sceAgcGetFusedShaderSize in Misc/src/ShaderFusion.cpp:415 and #8314 defines it too. Whichever lands second leaves two definitions. Please rebase onto #8314's head so the PR really stacks on it, drop the duplicate body here and keep only the extra test assertions.
  • core/libs/prx/libSceAgcVsh/Export.cpp:9 still exports cduV1f0dcGQ (sceAgcAcbAtomicGds) as a stub while the module compiles Acb/src/Control.cpp, where #8314 adds the real one. Once #8314 is in, the NID is exported twice and the Windows patcher rejects that. Drop the stub (and update the sceAgcAcbAtomicGds line in docs/dev/debt/libSceAgcVsh.md, which says the real implementation is deliberately disabled), or decide the module keeps the stub and keep it out of the compiled sources.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5800728773 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13940#pullrequestreview-5800728773). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-11-06T13:29:55Z. **Review:** CHANGES_REQUESTED --- Re-checked head `8bf5e05`: the source list, the new test and the CI results are fine, but the point from the last review is still open, and the branch does not match the earlier comment. - This head does not contain #8314 (`e79f6c1606`/`f2c1bf584a` are not ancestors; the PR is 3 commits on top of `main`), yet it still defines `sceAgcGetFusedShaderSize` in `Misc/src/ShaderFusion.cpp:415` and #8314 defines it too. Whichever lands second leaves two definitions. Please rebase onto #8314's head so the PR really stacks on it, drop the duplicate body here and keep only the extra test assertions. - `core/libs/prx/libSceAgcVsh/Export.cpp:9` still exports `cduV1f0dcGQ` (`sceAgcAcbAtomicGds`) as a stub while the module compiles `Acb/src/Control.cpp`, where #8314 adds the real one. Once #8314 is in, the NID is exported twice and the Windows patcher rejects that. Drop the stub (and update the `sceAgcAcbAtomicGds` line in `docs/dev/debt/libSceAgcVsh.md`, which says the real implementation is deliberately disabled), or decide the module keeps the stub and keep it out of the compiled sources.
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!13940
No description provided.