feat(libSceFreeType): expose native library build information #9792

Merged
santhoshkumar-dev merged 9 commits from upstream-pr/9792 into main 2026-11-02 07:58:36 +00:00
santhoshkumar-dev commented 2026-10-22 15:17:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-22T15:17:52Z.


What

Expose FT_Library_Version and FT_Get_TrueType_Engine_Type through the existing guest-library adapter. They query the native library behind the supplied handle. Optional 32-bit version outputs are copied from native locals in the native write order, including when output pointers alias. A null handle yields version 0.0.0 and engine type NONE.

Signatures and behavior follow bundled FreeType 2.13.3 ftobjs.c; names appear in the PS5 3.20 inventory. The version describes the configured native backend. Console ABI/version/build-option equivalence remains unverified and is recorded under Build debt.

Each implemented export is declared once in the canonical public API, included by the implementation and tests. The branch preserves the latest upstream PFR APIs and all merged FreeType features.

The named OT-provider import-resolution helpers also have one declaration each in the shared public API already reachable from the OT umbrella. Export.cpp includes that header. Their existing zero-argument placeholder signatures, explicit NID aliases and throwing behavior are unchanged; this does not establish the console prototypes.

The adapter belongs to physical libSceFreeType. Same-NID inventory stubs in the distinct physical libSceFreeTypeOl and libSceFreeTypeOt providers remain throwing helpers.

Tested

Submitted and tested head bb70cab04bdf89183bca9d111c6171ce3830ecdd, including upstream main 5d52b06ff3de0b2ce640dd296db465295c80e7fa.

Windows 11 x64 / WinLibs GCC 15.2.0 r7 and local Ubuntu 24.04.1 x86-64 under WSL2 / GCC 13.3.0 / glibc 2.39: Ninja Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF. On each platform the complete libs target and selected test executables build, and 69/69 CTests pass, zero skips: the public-header audit, all 64 public-header compilation batches and 4 focused runtime tests. Dependencies use the pinned submodule revisions. The feature, existing base/charmap APIs and packaged-library loader are covered.

Final upstream recheck: 801d5b9bc11049e6274daca09d70690bd5b8d0a9 merges cleanly, and no files changed by this contribution have changed after the tested base. Results remain pinned to the exact submitted head and its stated base.

Conventions, whitespace and all six pairwise merge checks across the four currently open contributions pass. Open/closed/merged history was rechecked; no replacement implementation was found. No title or physical-console execution is claimed.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4969728832 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9792). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-22T15:17:52Z. --- ### What Expose `FT_Library_Version` and `FT_Get_TrueType_Engine_Type` through the existing guest-library adapter. They query the native library behind the supplied handle. Optional 32-bit version outputs are copied from native locals in the native write order, including when output pointers alias. A null handle yields version 0.0.0 and engine type NONE. Signatures and behavior follow bundled [FreeType 2.13.3 ftobjs.c](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftobjs.c); names appear in the [PS5 3.20 inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceFreeTypeOt.c). The version describes the configured native backend. Console ABI/version/build-option equivalence remains unverified and is recorded under Build debt. Each implemented export is declared once in the canonical public API, included by the implementation and tests. The branch preserves the latest upstream PFR APIs and all merged FreeType features. The named OT-provider import-resolution helpers also have one declaration each in the shared public API already reachable from the OT umbrella. Export.cpp includes that header. Their existing zero-argument placeholder signatures, explicit NID aliases and throwing behavior are unchanged; this does not establish the console prototypes. The adapter belongs to physical `libSceFreeType`. Same-NID inventory stubs in the distinct physical `libSceFreeTypeOl` and `libSceFreeTypeOt` providers remain throwing helpers. ### Tested Submitted and tested head `bb70cab04bdf89183bca9d111c6171ce3830ecdd`, including upstream main `5d52b06ff3de0b2ce640dd296db465295c80e7fa`. Windows 11 x64 / WinLibs GCC 15.2.0 r7 and local Ubuntu 24.04.1 x86-64 under WSL2 / GCC 13.3.0 / glibc 2.39: Ninja Release, bundled dependencies, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`. On each platform the complete `libs` target and selected test executables build, and **69/69 CTests pass, zero skips**: the public-header audit, all 64 public-header compilation batches and 4 focused runtime tests. Dependencies use the pinned submodule revisions. The feature, existing base/charmap APIs and packaged-library loader are covered. Final upstream recheck: `801d5b9bc11049e6274daca09d70690bd5b8d0a9` merges cleanly, and no files changed by this contribution have changed after the tested base. Results remain pinned to the exact submitted head and its stated base. Conventions, whitespace and all six pairwise merge checks across the four currently open contributions pass. Open/closed/merged history was rechecked; no replacement implementation was found. No title or physical-console execution is claimed. <!-- 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: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
santhoshkumar-dev commented 2026-10-22 15:18:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-22T15:18:31Z.


Final local overlap audit on 882c68c973: no confirmed conflicts, duplicate exports, or shared new files. The tool lists eight older branches whose shared CMake file cannot be compared automatically because they already conflict with main (#5021, #6044, #7201, #7275, #7622, #8285, #8650, #9019). File-specific three-way checks put the build-info registration outside their conflict regions. It also merges independently with #9785 and the 27 existing FreeType branches checked during placement review.

The final full Windows build and all four focused checks passed. There is no dependency on another contribution PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6344323582 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9792#issuecomment-6344323582). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-22T15:18:31Z. --- Final local overlap audit on `882c68c973`: no confirmed conflicts, duplicate exports, or shared new files. The tool lists eight older branches whose shared CMake file cannot be compared automatically because they already conflict with main (#5021, #6044, #7201, #7275, #7622, #8285, #8650, #9019). File-specific three-way checks put the build-info registration outside their conflict regions. It also merges independently with #9785 and the 27 existing FreeType branches checked during placement review. The final full Windows build and all four focused checks passed. There is no dependency on another contribution PR.
MarcZX10 commented 2026-10-22 16:28:04 +00:00 (Migrated from github.com)

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

Review: DISMISSED


I inspected the two FreeType wrappers, the separate CMake registration and the test’s null-handle, optional-output, aliasing and independent-library coverage. The exact PR head configures and builds guest_freetype_build_info_tests successfully here. CTest could not reach the assertions because loading libkernel aborts at the repository’s documented host CPU gate: this Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE and AVX2. The PR reports the full Windows build and 4/4 focused tests passing. Hosted checks currently cover eligibility, conventions, intake, labels and report; full product builds were skipped.

The branch is eight commits behind current main (8499ea52e571b0edfc1feecfd3f6b9944012b359). CONTRIBUTING.md requires branches to be based on and kept up to date with main. Please sync it, resolve any conflicts, and rerun the focused tests after the update.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5617535436 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9792#pullrequestreview-5617535436). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T16:28:04Z. **Review:** DISMISSED --- I inspected the two FreeType wrappers, the separate CMake registration and the test’s null-handle, optional-output, aliasing and independent-library coverage. The exact PR head configures and builds `guest_freetype_build_info_tests` successfully here. CTest could not reach the assertions because loading libkernel aborts at the repository’s documented host CPU gate: this Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE and AVX2. The PR reports the full Windows build and 4/4 focused tests passing. Hosted checks currently cover eligibility, conventions, intake, labels and report; full product builds were skipped. The branch is eight commits behind current `main` (`8499ea52e571b0edfc1feecfd3f6b9944012b359`). CONTRIBUTING.md requires branches to be based on and kept up to date with `main`. Please sync it, resolve any conflicts, and rerun the focused tests after the update.
MarcZX10 commented 2026-10-22 16:55:53 +00:00 (Migrated from github.com)

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

Review: COMMENTED


I rechecked the exact head 882c68c97338b9b84c342ee2136b55846453ffb2 against current main (11f976b27c16ed91633f00039dba5dfd97dd7cc1). Conventions and git diff --check pass, and the merge tree is clean. The reported full Windows build plus 14/14 focused/integration checks are contributor-reported; hosted product jobs are skipped. I did not rerun the FreeType runtime test locally because the VM CPU fails the repository’s required libkernel feature gate. The branch is still based on b7d1d47a5f, 21 commits behind current main. Please rebase and rerun the focused FreeType checks on the updated head before merge; the conflict-prone CMake registration has a clean merge tree here.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5617847309 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9792#pullrequestreview-5617847309). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T16:55:53Z. **Review:** COMMENTED --- I rechecked the exact head `882c68c97338b9b84c342ee2136b55846453ffb2` against current `main` (`11f976b27c16ed91633f00039dba5dfd97dd7cc1`). Conventions and `git diff --check` pass, and the merge tree is clean. The reported full Windows build plus 14/14 focused/integration checks are contributor-reported; hosted product jobs are skipped. I did not rerun the FreeType runtime test locally because the VM CPU fails the repository’s required libkernel feature gate. The branch is still based on `b7d1d47a5f`, 21 commits behind current main. Please rebase and rerun the focused FreeType checks on the updated head before merge; the conflict-prone CMake registration has a clean merge tree here.
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!9792
No description provided.