Repository navigation
Conversation
9 tasks done
This was referenced Oct 11, 2026
This was referenced Oct 15, 2026
Merged
11 tasks done
11 tasks done
11 tasks done
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Run the public SDK's source-built
gpu_cubethrough the AOT compiler and a native Apple ARM64 runtime, with a reproducible graphics comparison. The generated program contains the translated CPU functions and native import implementations; it has no Rosetta dependency, x86 interpreter, runtime decoder or JIT. Graphics continues to use Vulkan/MoltenVK.This is a draft follow-up to #1835, kept separate from that PR. It contains:
The shared macOS foundation is reused from
mugurc/AnyPS5macos-portat21930ce5045b900282855fdc55d19714b155659d, with its provenance retained. Its fresh-page write-watch behavior and regression cases depend on #3703. The remaining integration changes include macOS stdio macros/socket polling and the missing shared-pointer compare/exchange operation. @mugurc: the intent is to keep this platform code shared, not establish another macOS implementation.The fixture explicitly corrects SDK API/layout declarations, depth setup and buffer-reuse synchronization. Its licensed, pinned
.sbshader containers are reused, not regenerated from PSSL. The reference retains the source compiler's contracted constant folding while separating runtime multiply/add operations to match the input's SSE2 arithmetic. This avoids a 2-ULP projection difference without relaxing image equality. All changes and the reproduction command are documented indocs/dev/BUILD.mdunder “Source-built native ARM64 graphics fixture”.The generic compiler/runtime changes are separate from the hash-qualified example annotations. This establishes one homebrew graphics path, not general ABI recovery, PS5 game compatibility, a complete ARM64 port or a speedup. The in-tree architecture decision remains with the maintainers; this draft provides runnable evidence for that discussion.
Current-main integration
Head
798fb84e2is a consolidated commit directly on mainb42ef24e0. It replaces the historical macOS merge chain; the required macOS library/runtime changes that have not landed upstream are still present and will be removed from the diff as their focused PRs land. #1835 remains a prerequisite. The merged #3703 implementation comes from main.The overlapping constant-folder change preserves both upstream starting-quad folding and the qualified wave64 vertex/32-lane-host rule. Shader validation remains unchanged. The cube's
atexit/exitsource evidence has been requalified against the new Process.cpp delegation, with RuntimeSupport.cpp pinned as an additional dependency. Registration changes only private host state and invokes callbacks later at finalization.Upstream now asserts x87 long-double storage in Math.cpp. The optional ARM64 graphics closure excludes this translation unit rather than weaken that ABI assertion; its other math providers are also unavailable until the x87 code is separated. The qualified cube does not import them. macOS guest-image flexible-memory accounting remains explicitly unsupported and throws; the cube uses direct memory.
Tested
Latest integration checkpoint (12 October): aligned with main
2f4cc8983, including the new component technical-debt layout. The final combined stack with the separate C++ follow-up #4718 passed 588 compiler/relinker/runtime checks and 26 native integrations on Apple Silicon. Rebuilt cube AOT/reference still match all eight RGB frames after 600 flips each; controller and typed module-bundle acceptance pass. These are local results; hosted CI is running on the updated head. Full Linux/Windows builds still require maintainer dispatch.Integration checkpoint, 12 October: merged main
fe66af13ethrough the dependency stack and requalified affected provider identities after reviewing their implementations. The final combined stack passed 526 compiler/relinker/runtime cases, 26 native integration cases, the rebuilt graphics pair (600 flips each, teardown, eight exact RGB frames), controller O2 and SHA/memcmp O0/O2 checks on Apple Silicon. Hosted checks refer to the new head and remain separate from these local results. Full Linux/Windows builds require maintainer dispatch.Apple M5 Max, macOS 27.2, Apple clang 21.0.0 (
clang-2100.3.34.2), MoltenVK 1.4.2:sysctl.proc_translated=0, 600 completed flips each, exit 0 and teardown.CI for the rewritten head is pending. Earlier green checks do not validate this head. The graphical desktop acceptance is local evidence; full Linux/Windows runtime jobs require a maintainer to dispatch Build on main with
pr=3891.After the documented dependency/environment setup:
cmake -S . -B build-graphics -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DANYPS5_NATIVE_AOT=ON -DANYPS5_NATIVE_GRAPHICS=ON -DBUILD_TESTING=OFF cmake --build build-graphics --target native_gpu_cube_check --parallel 6Checklist
Based on current
main; no other open PR implements the same functions (prerequisites listed below)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 in TechnicalDebtNo notes, investigation
.mdfiles 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: feat(aot): discuss native ARM64 compiler architecture and integration #1835 (fix(libc): track never-collected pages in the macOS write watch #3703 is merged and included from main)
AI-assisted: yes
Unblocks: none