feat(libSceFreeType): implement FT_Outline_Render #10609
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10609"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T12:37:16Z.
What
Adds
FT_Outline_Renderto libSceFreeType, following the bundled FreeType 2.13.3 (ftoutln.c) with an LP64FT_Raster_Paramslayout (newGuestRasterParams, 96 bytes, with a layout assertion). The outline is rendered from a native copy; a bitmap target is rendered into in place; agray_spanscallback is invoked with the native spans through a small trampoline that uses the guest's calling convention, so the direct mode works on every host;clip_boxis converted only when the clip flag is set and written back in direct mode, as the native call does;sourceis set to the guest outline.black_spans,bit_testandbit_setthrow because the native renderer does not use them. A guest coordinate outside the hostFT_Posrange throws (Windows only). Console signature, parameter layout and errors are unverified; the debt entry says so.Commits: implementation, test, debt entry.
Tested
Original PR head
4f3614e2cd5f7eadc1b9d9599fe84f810ce6b92a: Windows 11 Pro 10.0.26300, x86-64, WinLibs MinGW-w64 GCC 15.2.0 r7 (UCRT, POSIX threads), Ninja, Release. A reviewer builtguest_freetype_outline_render_testsand neighboring FreeType tests. The default Windows CTest invocation for this target failed before test execution with0xc0000135because its DLL directory was missing fromPATH; prependingbuild/core/libs/libs/unpatchedmade four focused FreeType suites pass 3/3 each. This PR adds the same target-directoryPATHsetup to the new CTest registration. These Windows runs were on the original head, before this follow-up.This follow-up adds gray and monochrome negative-pitch comparisons and preserves output parameters on native errors. Local CMake configuration was attempted after initializing SDL2, but could not complete because other dependency submodules (FFmpeg, libusb, zstd, Opus, glslang and LibAtrac9) are unavailable or uninitialized in this worktree; the new regressions were not run locally.
python3 tools/check_conventions.py --base upstream/main --head HEADandgit diff --checkpass for the follow-up. Hosted product test jobs were skipped on the original head; checks for the updated head are pending. No title or GPU validation was run.Current head
b987789b00: Linux x86-64, GCC, full CMake build (Ninja, Release) ofguest_freetype_outline_render_tests, which passes. This host fails the startup CPU-feature gate, so the binary was run in a throwaway build copy with that check disabled; nothing of that is in the branch. As a negative control, putting the old tracked-write range back (moved back bypitch * (rows - 1)) makes the test fail at its tracked-write check. The public header audit and all 64public_headers_compile_*batches pass. Windows was not run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:57:41Z.
Review: COMMENTED
Reviewed — reply answered, debt doc duplicates still open
The 28 Oct request about duplicate provider entries in the debt doc still applies at this head, so the branch has not changed since that comment.
What I ran
Live head
9a30149014644ad0b510c235289511272f709571(matches batch).gh pr view --json headRefOid,state,gh apireads of issue comments, review comments and reviews,gh pr view --json statusCheckRollup,git show <head>:<path>on the debt doc,Export.cpp,OutlineRender.cppand the test file. Nothing was built or run.Results
Findings
oneandonlydean, 28 Oct: duplicate entries. Confirmed.docs/dev/debt/libSceFreeTypeOt.md:3and:5both list the identified NIDs;:4says 139 and:6says 129sceFreeTypeOtUnknown_*exports. The reviewer asks to keep main's entries (:5,:6), addFT_Outline_Renderto main's name list, lower main's count by one, and drop this PR's two entries (:3,:4). A grep ofExport.cppat head finds 125 uniquesceFreeTypeOtUnknown_names. I did not reconcile that with the doc's counting, so the final number is not verified.FT_Outline_Render_nid_postfixatGuestFreeTypeOutlineRender.cpp:18, andApi.hpphas no declaration of it. Still open at this head.Sources
github.com/boykopovar/AnyPS5@9a30149014/docs/dev/debt/libSceFreeTypeOt.md (L3-L6)github.com/boykopovar/AnyPS5@9a30149014/core/libs/tests/GuestFreeTypeOutlineRender.cpp (L18)Not verified
RasterTargetSpanstarts atbufferand covers|pitch| * rows(github.com/boykopovar/AnyPS5@9a30149014/core/libs/prx/libSceFreeType/src/OutlineRender.cpp (L41-L46)), which matches the reviewer's ask. The test buffer placement was not checked in full.