feat(libSceFreeTypeOt): declare missing exports and forward base APIs #12370

Merged
kyon-eth merged 19 commits from upstream-pr/12370 into main 2026-11-09 12:41:30 +00:00
kyon-eth commented 2026-10-28 11:22:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kyon-eth on 2026-10-28T11:22:51Z.


What

Declare 96 missing callable exports with explicit NID aliases. Unverified signatures throw through NotImplemented_nid_no_patch; these are import-resolution placeholders, not verified ABI prototypes or new runtime behavior.

Retain one libSceFreeType dependency and add 68 typed Windows forwarders to its existing APIs, removing child throwing aliases that would shadow working providers. Non-Windows builds retain the base dependency without duplicating guest-object registries. Reserve FT_Done_Memory for #12321, the eight trigonometry/outline providers below for #11613, and 20 data exports whose guest layouts/lifetimes remain unknown. No fabricated globals or title unblock is claimed.

Landing order

  • #11426 is merged and integrated in 6fd0b948e6; its corner implementations and test registration are retained.
  • #11613 before #11878 before this PR. The #11613-before-#11878 order is confirmed by those authors. This PR is held after both. The eight reserved Ot providers are FT_Cos, FT_Angle_Diff, FT_Sin, FT_Tan, FT_Vector_Unit, FT_Outline_Copy, FT_Outline_Decompose, and FT_Outline_Get_Orientation; no competing Windows forwarders are added here. After those prerequisites land, retain their provider sources, square-root adapter, public declarations and tests, and remove aliases shadowed by their implementations. Our commitment to follow #11878 imposes no wait on that author; it is not a claim of their endorsement.
  • #12473 is merged. The stream implementation and tests are retained; superseded aliases were removed. The #11613 and #11878 prerequisites remain open. This PR remains held until those land and their source and tests are reconciled.

Tested

  • Merged main at d4de5943f68, preserving the stream and square-root implementations. The four existing throwing placeholders for reserved exports remain until #11613 lands; a source-level comparison found no main NIDs removed. Three-way merge previews with the remaining prerequisites need landing-time reconciliation.
  • On this head, public-header audit, PR diff whitespace, macOS syntax checks for the export, declaration, stream and forwarder sources, and a Windows-preprocessor forwarder syntax check pass. The macOS corner test passes against the merged production source. The syntax check emitted existing libc header warnings. These checks do not verify Windows forwarding or a full product build.
  • On the previous head, macOS x86-64 integrated source passed raw and patched FreeType stream tests, and the corner tests passed with a throwing helper. All four Ot translation units passed syntax checks. Conventions and PR diff whitespace checks pass. This was not a full product build.
  • Earlier component verification compiled/linked the production declaration component and found all 96 selected NIDs in its patched export trie. Typed forwarding syntax/type checking with Windows declarations enabled passed; runtime forwarding was not established by that check. The earlier runtime probe was blocked by unavailable libc helpers.
  • An earlier all-open-PR scan found shared-file conflicts with #11613, #11878 and other FreeTypeOt PRs; several stale branches could not be fully compared. The two agreed prerequisites remain ahead of this PR, and the remaining overlaps require landing-time review.
  • No author Linux/Windows execution, console run, title run, performance claim or full game unblock.

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: #11613, #11878 (both before this PR; #11426 and #12473 are merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5049641809 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12370). Originally posted by [kyon-eth](https://github.com/kyon-eth) on 2026-10-28T11:22:51Z. --- ### What Declare 96 missing callable exports with explicit NID aliases. Unverified signatures throw through `NotImplemented_nid_no_patch`; these are import-resolution placeholders, not verified ABI prototypes or new runtime behavior. Retain one `libSceFreeType` dependency and add 68 typed Windows forwarders to its existing APIs, removing child throwing aliases that would shadow working providers. Non-Windows builds retain the base dependency without duplicating guest-object registries. Reserve `FT_Done_Memory` for #12321, the eight trigonometry/outline providers below for #11613, and 20 data exports whose guest layouts/lifetimes remain unknown. No fabricated globals or title unblock is claimed. ### Landing order - **#11426 is merged and integrated** in `6fd0b948e6`; its corner implementations and test registration are retained. - **#11613 before #11878 before this PR.** The #11613-before-#11878 order is [confirmed by those authors](https://github.com/boykopovar/AnyPS5/pull/11878#issuecomment-6440965748). This PR is held after both. The eight reserved Ot providers are `FT_Cos`, `FT_Angle_Diff`, `FT_Sin`, `FT_Tan`, `FT_Vector_Unit`, `FT_Outline_Copy`, `FT_Outline_Decompose`, and `FT_Outline_Get_Orientation`; no competing Windows forwarders are added here. After those prerequisites land, retain their provider sources, square-root adapter, public declarations and tests, and remove aliases shadowed by their implementations. Our [commitment to follow #11878](https://github.com/boykopovar/AnyPS5/pull/11878#issuecomment-6475347488) imposes no wait on that author; it is not a claim of their endorsement. - **#12473 is merged.** The stream implementation and tests are retained; superseded aliases were removed. The #11613 and #11878 prerequisites remain open. This PR remains held until those land and their source and tests are reconciled. ### Tested - Merged main at `d4de5943f68`, preserving the stream and square-root implementations. The four existing throwing placeholders for reserved exports remain until #11613 lands; a source-level comparison found no main NIDs removed. Three-way merge previews with the remaining prerequisites need landing-time reconciliation. - On this head, public-header audit, PR diff whitespace, macOS syntax checks for the export, declaration, stream and forwarder sources, and a Windows-preprocessor forwarder syntax check pass. The macOS corner test passes against the merged production source. The syntax check emitted existing libc header warnings. These checks do not verify Windows forwarding or a full product build. - On the previous head, macOS x86-64 integrated source passed raw and patched FreeType stream tests, and the corner tests passed with a throwing helper. All four Ot translation units passed syntax checks. Conventions and PR diff whitespace checks pass. This was not a full product build. - Earlier component verification compiled/linked the production declaration component and found all 96 selected NIDs in its patched export trie. Typed forwarding syntax/type checking with Windows declarations enabled passed; runtime forwarding was not established by that check. The earlier runtime probe was blocked by unavailable libc helpers. - An earlier all-open-PR scan found shared-file conflicts with #11613, #11878 and other FreeTypeOt PRs; several stale branches could not be fully compared. The two agreed prerequisites remain ahead of this PR, and the remaining overlaps require landing-time review. - No author Linux/Windows execution, console run, title run, performance claim or full game unblock. <!-- 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. --> ### 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: #11613, #11878 (both before this PR; #11426 and #12473 are merged) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-28 11:25:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T11:25:22Z.

Review: DISMISSED


There is one repository-convention blocker in the new Windows forwarders. ForwardExports.cpp defines 74 APS5_VABI functions such as FT_Activate_SizeForward_nid_no_patch, but none of these names is declared in a header reachable through libSceFreeTypeOt.hpp; AdditionalExports.hpp only declares the throwing placeholders. I checked every forwarder against the library headers. CONTRIBUTING/AGENTS require exactly one declaration for every APS5_VABI export in a header reachable through the library umbrella. Please add the forwarder declarations to an appropriate header and include it from the umbrella, then rerun the convention check. The current conventions job is still queued, and source component/forwarding link checks are also pending; I have not reviewed the remaining NID inventory in full or approved.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5681846941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12370#pullrequestreview-5681846941). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T11:25:22Z. **Review:** DISMISSED --- There is one repository-convention blocker in the new Windows forwarders. `ForwardExports.cpp` defines 74 `APS5_VABI` functions such as `FT_Activate_SizeForward_nid_no_patch`, but none of these names is declared in a header reachable through `libSceFreeTypeOt.hpp`; `AdditionalExports.hpp` only declares the throwing placeholders. I checked every forwarder against the library headers. CONTRIBUTING/AGENTS require exactly one declaration for every APS5_VABI export in a header reachable through the library umbrella. Please add the forwarder declarations to an appropriate header and include it from the umbrella, then rerun the convention check. The current conventions job is still queued, and source component/forwarding link checks are also pending; I have not reviewed the remaining NID inventory in full or approved.
MarcZX10 commented 2026-10-28 11:29:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T11:29:54Z.

Review: COMMENTED


Follow-up to my previous review: the requested declaration change is withdrawn; the NID helper aliases are internal forwarding targets, and the public API declarations are already reachable through the included base header. I found no source-level blocker in that point. This remains an incomplete review while I wait for the Windows link/build check and finish the NID inventory review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5681900119 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12370#pullrequestreview-5681900119). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T11:29:54Z. **Review:** COMMENTED --- Follow-up to my previous review: the requested declaration change is withdrawn; the NID helper aliases are internal forwarding targets, and the public API declarations are already reachable through the included base header. I found no source-level blocker in that point. This remains an incomplete review while I wait for the Windows link/build check and finish the NID inventory review.
MarcZX10 commented 2026-10-28 11:46:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T11:46:19Z.

Review: DISMISSED


I completed the exact-head source and check review for 927c5f91be644bc8aae254e0e391f530da617353: the 74 Windows forwarder targets resolve to the base FreeType declarations, the current Windows job passes, and conventions, intake, labels and report checks pass. I have one repository-integration blocker before approval. The PR body identifies confirmed shared-file conflicts with #11878 and #11426, while the checklist says Depends on: none; I do not see a merge-order agreement with those authors recorded here. CONTRIBUTING.md requires authors of overlapping PRs to agree which goes first and record the order with Depends on. Please coordinate with both authors, update the dependency/order line, then rebase and refresh the checks as needed. No additional code defect found in this pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5682075842 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12370#pullrequestreview-5682075842). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T11:46:19Z. **Review:** DISMISSED --- I completed the exact-head source and check review for `927c5f91be644bc8aae254e0e391f530da617353`: the 74 Windows forwarder targets resolve to the base FreeType declarations, the current Windows job passes, and conventions, intake, labels and report checks pass. I have one repository-integration blocker before approval. The PR body identifies confirmed shared-file conflicts with #11878 and #11426, while the checklist says `Depends on: none`; I do not see a merge-order agreement with those authors recorded here. `CONTRIBUTING.md` requires authors of overlapping PRs to agree which goes first and record the order with `Depends on`. Please coordinate with both authors, update the dependency/order line, then rebase and refresh the checks as needed. No additional code defect found in this pass.
adriadam10 commented 2026-10-28 11:49:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T11:49:21Z.

Review: DISMISSED


Checked the 74 Windows forwarders against libSceFreeType (every *_nid_postfix target exists on main and the NIDs match the Ot aliases removed from Export.cpp), the 96 throwing declarations and the debt entries; no code defect found. One blocker, the same one @MarcZX10 raised on this head:

  • The branch conflicts in content with two open PRs: #11878 (libSceFreeTypeOt/Export.cpp) and #11426 (libSceFreeTypeOt/Export.cpp, libSceFreeTypeOt/CMakeLists.txt, docs/dev/debt/libSceFreeTypeOt.md), both checked with git merge-tree against this head. The body says Depends on: none. Please agree the merge order with both authors, record it in Depends on, and rebase onto whichever lands first.

Once that is done this is ready to go through the merge queue.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5682110634 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12370#pullrequestreview-5682110634). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-28T11:49:21Z. **Review:** DISMISSED --- Checked the 74 Windows forwarders against libSceFreeType (every `*_nid_postfix` target exists on main and the NIDs match the Ot aliases removed from `Export.cpp`), the 96 throwing declarations and the debt entries; no code defect found. One blocker, the same one @MarcZX10 raised on this head: - The branch conflicts in content with two open PRs: #11878 (`libSceFreeTypeOt/Export.cpp`) and #11426 (`libSceFreeTypeOt/Export.cpp`, `libSceFreeTypeOt/CMakeLists.txt`, `docs/dev/debt/libSceFreeTypeOt.md`), both checked with `git merge-tree` against this head. The body says `Depends on: none`. Please agree the merge order with both authors, record it in `Depends on`, and rebase onto whichever lands first. Once that is done this is ready to go through the merge queue.
MarcZX10 commented 2026-10-29 06:10:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T06:10:39Z.

Review: DISMISSED


Re-checked — changes requested

What I checked

  • Reviewed exact head 6fd0b948e67135bf20f3de7a642ed246ae6b4cb4 against fetched main 2960e9a6e7.
  • The earlier forwarder-declaration concern is withdrawn: the forwarding targets resolve through the included FreeType base declarations. The latest diff removes competing forwards and reserves the eight NIDs for #11613 as described.
  • The current-main merge preview is clean; conventions, Windows, eligibility, labels, and report checks pass. The author reports typed Windows-forwarder checks, but no runtime test, Linux/Windows test run, title run, or console run is claimed.

Blocking integration items

The checklist correctly lists #11613, #11878, and #12473 as prerequisites, and the description says this PR will be rebased after they land. All three are still open. Their providers and stream calls are needed to determine the final set of throwing aliases and to validate that the 68 forwarders do not shadow implementations. Please hold this PR until the listed prerequisites land, then rebase and rerun the inventory/forwarding checks on the combined result. The current head is 315 commits behind fetched main, so refresh it at that point as well.

I am not asking for new work before the stated prerequisites land; I cannot approve an intentionally incomplete stack or treat the current source-only checks as integration validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693572584 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12370#pullrequestreview-5693572584). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T06:10:39Z. **Review:** DISMISSED --- # Re-checked — changes requested ## What I checked - Reviewed exact head `6fd0b948e67135bf20f3de7a642ed246ae6b4cb4` against fetched `main` `2960e9a6e7`. - The earlier forwarder-declaration concern is withdrawn: the forwarding targets resolve through the included FreeType base declarations. The latest diff removes competing forwards and reserves the eight NIDs for #11613 as described. - The current-main merge preview is clean; conventions, Windows, eligibility, labels, and report checks pass. The author reports typed Windows-forwarder checks, but no runtime test, Linux/Windows test run, title run, or console run is claimed. ## Blocking integration items The checklist correctly lists #11613, #11878, and #12473 as prerequisites, and the description says this PR will be rebased after they land. All three are still open. Their providers and stream calls are needed to determine the final set of throwing aliases and to validate that the 68 forwarders do not shadow implementations. Please hold this PR until the listed prerequisites land, then rebase and rerun the inventory/forwarding checks on the combined result. The current head is 315 commits behind fetched `main`, so refresh it at that point as well. I am not asking for new work before the stated prerequisites land; I cannot approve an intentionally incomplete stack or treat the current source-only checks as integration validation.
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!12370
No description provided.