Skip to content

feat(libSceFreeTypeOt): restore outline bitmap forwarding - #20047

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
THEMANnt:fix/freetype-ot-outline-bitmap-forwarding
Nov 15, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
THEMANnt:fix/freetype-ot-outline-bitmap-forwarding

Conversation

@THEMANnt

Copy link
Copy Markdown
Contributor

What

Restore FT_Outline_Get_Bitmap forwarding from #19411 after the revert in #19762. Keep 4RRjK-Wd1lU exported by libSceFreeTypeOt and call the existing bitmap adapter through FreeTypeOutlineGetBitmap_nid_no_patch. This prevents the patched ELF import from resolving back to the Ot export. The rasterization stays in libSceFreeType.

RiverWhy and kaiffeetasse traced the self-binding in #19762. The bitmap work currently shared by #19410 and #19415 moves here. Those two branches have follow-up revisions prepared for after this lands. #13730 handles other instances of the same Linux problem.

Tested

On ac9ac0ef09, guest_freetype_outline_bitmap, guest_freetype_ot, and guest_freetype_ot_patched each passed three consecutive runs on Ubuntu 24.04.5 (GCC 13.3, Ninja, Release, WSL2) and Windows x64 (GCC 15.2, Ninja, Release). The Ot test compares rendered pixels with native FreeType. The original forwarding timed out at 20.02 s on Linux with the same test. Restoring the fix passed in 0.01 s. Linux nm -D and Windows objdump -p show the patched Ot module defines 4RRjK-Wd1lU. The Linux binary has no import of that NID. Conventions and git diff --check passed. The overlap checker flagged shared files on eight branches; manual inspection found bitmap implementation overlap only in #19410 and #19415.

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

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Progress report (579a566 → 2afc9ec)

📈 System libraries: 41.32% (+0.0025%, +1 implemented function)

✅ 1 implemented
Library Name
libSceFreeTypeOt sceFreeTypeOtOutlineGetBitmap_nid_no_patch

Changed libraries (implemented exports)

Library Before After Change
libSceFreeTypeOt 142/199 (71.36%) 143/199 (71.86%) +0.50%

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this; the change restores typed outline bitmap forwarding through the shared adapter and adds coverage for the Ot export.

What I ran

Reviewed head ac9ac0ef09643c20d19328c0e897a57da5f2cd49. I read all five changed files and the prepared description, commit list, manifest, and diff through repo_read.py. I did not run commands or tests; the test results in the description are author-reported.

Results

Check Result Note
Diff and changed code review passed All five changed files read
Tests and build not run Author reports Linux and Windows test runs
Console behavior not run Not measured on console

Findings

Blocking

None.

Non-blocking

None.

Not verified

The claimed test runs, binary export inspection, conventions check, and git diff --check were not independently verified. Console runtime behavior was not tested. All files marked reviewed in the manifest were read; no changed files were excluded.

To get this to a good state

Nothing is required.

@THEMANnt

Copy link
Copy Markdown
Contributor Author

The Windows build completed, and guest_freetype_outline_bitmap, guest_freetype_ot, and guest_freetype_ot_patched all passed. The only failing test was guest_appcontent, which aborted with 0xc0000409. The same test failed with that exit code on main at 5a46735c05, the base used by this job. I also reproduced the abort locally on that base without the bitmap patch. PR Windows run · Main Windows run

#20058 addresses the AppContent regression. Once its revert is on main, this PR needs a fresh Windows CI run against the updated base.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 9410 core/libs/prx/libSceFreeType/include/Api.hpp
PR 10897 core/libs/prx/libSceFreeType/include/Api.hpp
core/libs/prx/libSceFreeTypeOt/Export.cpp
docs/dev/debt/libSceFreeTypeOt.md
PR 13730 core/libs/prx/libSceFreeType/include/Api.hpp
core/libs/prx/libSceFreeTypeOt/Export.cpp
PR 14212 docs/dev/debt/libSceFreeTypeOt.md
PR 15052 core/libs/prx/libSceFreeTypeOt/Export.cpp
docs/dev/debt/libSceFreeTypeOt.md
PR 16823 core/libs/prx/libSceFreeTypeOt/Export.cpp
docs/dev/debt/libSceFreeTypeOt.md
PR 17715 core/libs/prx/libSceFreeTypeOt/Export.cpp
docs/dev/debt/libSceFreeTypeOt.md
PR 17776 core/libs/prx/libSceFreeType/include/Api.hpp
core/libs/prx/libSceFreeTypeOt/Export.cpp
core/libs/tests/GuestFreeTypeOt.cpp
docs/dev/debt/libSceFreeTypeOt.md
PR 18112 core/libs/prx/libSceFreeType/include/Api.hpp
core/libs/prx/libSceFreeTypeOt/Export.cpp
PR 18482 core/libs/prx/libSceFreeType/include/Api.hpp
core/libs/prx/libSceFreeTypeOt/Export.cpp
docs/dev/debt/libSceFreeTypeOt.md

@THEMANnt
THEMANnt force-pushed the fix/freetype-ot-outline-bitmap-forwarding branch from ac9ac0e to 8273ec8 Compare November 14, 2026 15:05
@THEMANnt

Copy link
Copy Markdown
Contributor Author

#20058 has landed, and I rebased this PR onto the updated main in 8273ec822d. The bitmap patch is unchanged. The previously failing guest_appcontent test and all three focused FreeType tests passed three consecutive runs locally on Windows. The fresh Windows CI run is in progress.

@THEMANnt

Copy link
Copy Markdown
Contributor Author

The Windows build passed after the rebase, and guest_appcontent and all three FreeType checks passed. The only failure was agc_graphics_profile_draw, which hit the same unmapped depth-buffer page assertion on this PR and on its exact main base commit (c04f8bec02).

Could a maintainer rerun the Windows job on #20047?

PR Windows log · Main Windows log

@JJenkx

JJenkx commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 8273ec822d, merged onto main 93af0c1cb4 (c552d2bc50, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • guest_freetype_ot, guest_freetype_ot_patched pass in 3 of 3 runs, none skipped.

AI-assisted: yes.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 15, 2026
@THEMANnt
THEMANnt force-pushed the fix/freetype-ot-outline-bitmap-forwarding branch from 8273ec8 to 2afc9ec Compare November 15, 2026 18:57
@THEMANnt

Copy link
Copy Markdown
Contributor Author

Rebased onto 7085a08145 to resolve the conflict with the newer outline exports. Main now includes the AGC depth fixture cache invalidation from a3e6411534. On Windows, guest_freetype_outline_bitmap, guest_freetype_ot, and guest_freetype_ot_patched each passed three consecutive runs on 2afc9ecb90. Fresh Build workflow. Thanks @JJenkx for testing the previous revision.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 15, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — comments

This review covers head 2afc9ec; no blocking defects were verified, but host tests and the console provider were not verified.

What I ran

Read the prepared diff and all five changed files listed as reviewed in the manifest using repo_read.py. No commands or tests were run.

Results

Check Result Note
Diff and changed files passed All five reviewed files read
Tests not run Test outcomes in the description are author reported
Console behavior not run Provider remains unmeasured

Findings

Blocking

None.

Non-blocking

  • The added test exercises positive pitch in gray and mono modes, but not negative pitch or extreme pitch/row dimensions. Consider covering those bitmap layout cases to guard the adapter’s buffer-size calculation at core/libs/prx/libSceFreeType/src/OutlineBitmap.cpp:41.

Not verified

  • No build or tests were run; reported Ubuntu and Windows results are author reported.
  • Console provider behavior was not measured.
  • All five files listed under reviewed in manifest.json were read. No changed files were excluded by the manifest.

To get this to a good state

Nothing is required. Optional: add bitmap layout coverage for negative pitch and large dimensions.

@oneandonlydean
oneandonlydean merged commit efe860e into boykopovar:main Nov 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants