feat(libSceNKWebKit): implement TransformationMatrix::applyPerspective #17643
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17643"
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 sandivd on 2026-11-09T06:32:09Z.
What
WebCore::TransformationMatrix::applyPerspective(double)(NIDE4A0yvypFeA) previously threw throughNotImplemented_nid_no_patch. It now follows the pinned PS5 WebKit reference (TransformationMatrix.cpp, TransformationMatrix.h):-1/pis written tom_matrix[2][3]of a new identity matrix only whenp != 0, and the existingmultiplyexport then composesthis = mat * thisunconditionally (also for zero, as in the pinned source, which has no zero early return), returning*this.Six files: the throwing stub and its legacy declaration are removed (
Export.cpp,LegacyExports.hpp); the typed declaration is added toWebCoreExports.hpp; the implementation tosrc/WebCoreTransform.cpp;TestApplyPerspectiveis registered intests/WebCoreGeometry.cppand runs through the real library boundary with alignment/offset canaries and a same-term-order SSE2 reference; the change and its verification limits are documented indocs/dev/debt/libSceNKWebKit.md.Tested
Independently re-run during the final publication gate, on Linux (WSL2 Ubuntu 24.04, g++ 13.3.0, CMake Release + Ninja,
BUILD_TESTING=ON), on a fresh snapshot of current upstreammainwith this patch applied, verified content-identical to the pushed commit by git tree-hash equality. All exit codes 0:ctest -R nkwebkit_webcoregeometry --output-on-failure— 1/1 Passed. Includes the newTestApplyPerspective: 7 input matrices × 12 perspectives covering ±0.0, ±inf, NaN and denormals, plus a 4-step composition loop, checked through the real library boundary with alignment/offset canaries against a same-term-order SSE2 reference.ctest -R guest_standard_streams --output-on-failure— 5/5 Passed.ctest -R public_headers --output-on-failure— 65/65 Passed (public_headersaudit: 407 libraries, 33661 exports, unique declarations and umbrella coverage; plus 64 compile shards).Prior author-session evidence, kept for completeness but not re-executed during the final gate (logs in the author's local build directory):
nkwebkit_webcoregeometry.APS5_VABIfunction compiled.objdumpof the Windows host object: SysV shape (self in RDI,doublein XMM0, reference returned in RAX),-1/pviadivsdintomat.m_matrix[2][3],multiplycalled even for zero._ZN7WebCore20TransformationMatrix16applyPerspectiveEd; ap == 0early-return variant is caught by the test's NaN check.Limitations: not verified against PS5 hardware or a console
libSceNKWebKitmodule (documented in the debt entry); the full repository CTest suite was not run; host floating-point evaluation (rounding, NaN payloads) can differ from a console-compiled multiply (documented in the debt entry).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)