build(agc): compile Lifecycle, GuestMemory and GuestBufferMemory on macOS #11447

Merged
iamthehimansh merged 9 commits from upstream-pr/11447 into main 2026-11-01 10:39:32 +00:00
iamthehimansh commented 2026-10-26 13:54:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by iamthehimansh on 2026-10-26T13:54:55Z.


What

Next part of splitting #8658, as @imellag asked on #11303. With the open macOS PRs for libkernel and libc, these three libSceAgcDriver files are what still keep the AGC driver from building on macOS. Each change is macOS-only; Linux and Windows compile the same code as before.

  • Execution/src/Driver/Lifecycle.cpp: macOS reserves 0xfc0000000-0x1000000000 with maximum protection none, so the driver's guest block is placed lower in the same system-reserved guest range. The address is in the new Execution/include/Driver/DriverMemory.hpp. macOS has no MAP_FIXED_NOREPLACE, so the block is mapped with a plain address hint and the driver fails unless the kernel places it exactly there; it never replaces an existing mapping. Stack bounds come from pthread_get_stackaddr_np / pthread_get_stacksize_np.
  • Execution/src/GuestMemory.cpp: describes guest pages with mach_vm_region instead of /proc/self/maps. It reports a write-watched page's guest protection rather than the PROT_WRITE the watch removed. <link.h> is not included on macOS.
  • Graphics/src/GuestBufferMemory.cpp: macOS has no udmabuf, so the dma-buf import probe reports it unsupported and buffers stay host memory.
  • Two tests that hard-code the console's 0xfe0040000 (found by @tkcm01 on an M4): libSceAgc/tests/StaticBuffer.cpp now reads the static table at the address the driver uses on macOS. libSceAgcDriver/tests/execution/ComputeFsTableCalls.cpp is skipped on macOS, as it already is under ANYPS5_ENABLE_ASAN: its shader builds the table address from two s_mov_b32 literals, and the driver does not rewrite that yet. The gap is listed under Functional in docs/dev/debt/libSceAgcDriver.md.

The GuestMemory.cpp protection reporting is a runtime change, tested below. The other two only choose macOS placement and the host-memory path.

Overlap and dependencies

  • Texture.cpp was in the first version of this PR. It's dropped: @imellag's #10676 already makes PendingList::published build with Apple's libc++, and @maximilianfv's #10859 already keeps sRGB storage images in their UNORM twin.
  • FrameRecorder.cpp's environ declaration is in @maximilianfv's #10540.
  • @marion909's #7201, which added a competing Apple describePages block to GuestMemory.cpp, was closed without merging on 27 Oct, so that overlap is gone. Re-checked against all 1,234 open PRs on 27 Oct: none adds more than 7 of this PR's added lines to any of these files, and those shared lines are braces and common includes.

Tested

Apple M2 Pro, macOS 26.6.2, MoltenVK 1.4.2, x86_64 Release under Rosetta 2, with Ninja. On main at 2dbe9b99f, the three .cpp files compile; main fails all three. Linux and Windows unifdef -U__APPLE__ views (-D__linux__ and -D_WIN32) equal main.

libSceAgcDriver only links on macOS with the other open macOS PRs. So the runtime check uses a local base: main at b27cc8416, plus #10552, #10898, #8311 and #9738, local-only patches for the files still failing there, and the changes from #10676, #10859, #10540 and a macOS Vulkan loader for VulkanDevice.cpp. That's the base #11303 was tested on. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, 3 runs each:

test #8658's versions of these files this PR 922458fb0
agc_write_tracking pass 3/3 pass 3/3
agc_driver_pooled_buffer_range fail 3/3 (needs #11303) fail 3/3 (needs #11303); pass 3/3 with #11303
agc_driver_image_table_reuse fail 3/3 fail 3/3

No VUID messages in any run. agc_driver_image_table_reuse fails the same way with and without this PR ("0 table descriptor writes kept, expected 3"); that is a separate MoltenVK descriptor issue. After the Lifecycle.cpp mapping change below (af1c552ee), the same base gave the same results: agc_write_tracking 3/3, agc_driver_pooled_buffer_range with #11303 3/3, agc_driver_image_table_reuse failing as before with the device up, and no VUIDs.

The two tests on the same base, 2 runs each:

test main's test file this PR (0b8115c2c)
agc_static_buffer fail 2/2 (Bus error) pass 2/2
agc_driver_compute_fs_table_calls fail 2/2 skipped 2/2

Driver-block mapping: the block is mapped at 0xee0000000 with an address hint only, with no MAP_FIXED. A standalone x86_64 probe of the old and new MapDriverMemory logic placed an unrelated PROT_NONE mapping there first. The old logic mapped over it (protection afterwards 3, so it was replaced). The new logic refused, and the unrelated mapping stayed at protection 0. With the address free, both mapped exactly there. @imellag ran this PR's first head on an M4 Pro (see the comment below): libSceAgcDriver links, and Planet of Lana reaches gameplay. python3 tools/check_conventions.py --base origin/main passes.

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: #12565 (merge order for docs/dev/debt/libSceAgcDriver.md: #10760, then #12565, then this PR, which keeps both edits when it merges main); none to compile these files; linking libSceAgcDriver on macOS also needs #10540, #10676 and #10859
  • Fixes: none
  • Unblocks: building libSceAgcDriver on macOS
  • GPUs tested: Apple M2 Pro (MoltenVK 1.4.2, macOS 26.6.2); Apple M4 Pro per @imellag
  • AI-assisted: yes (Cana)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5018620032 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447). Originally posted by [iamthehimansh](https://github.com/iamthehimansh) on 2026-10-26T13:54:55Z. --- ### What Next part of splitting #8658, as @imellag asked on #11303. With the open macOS PRs for `libkernel` and libc, these three `libSceAgcDriver` files are what still keep the AGC driver from building on macOS. Each change is macOS-only; Linux and Windows compile the same code as before. - `Execution/src/Driver/Lifecycle.cpp`: macOS reserves `0xfc0000000`-`0x1000000000` with maximum protection none, so the driver's guest block is placed lower in the same system-reserved guest range. The address is in the new `Execution/include/Driver/DriverMemory.hpp`. macOS has no `MAP_FIXED_NOREPLACE`, so the block is mapped with a plain address hint and the driver fails unless the kernel places it exactly there; it never replaces an existing mapping. Stack bounds come from `pthread_get_stackaddr_np` / `pthread_get_stacksize_np`. - `Execution/src/GuestMemory.cpp`: describes guest pages with `mach_vm_region` instead of `/proc/self/maps`. It reports a write-watched page's guest protection rather than the `PROT_WRITE` the watch removed. `<link.h>` is not included on macOS. - `Graphics/src/GuestBufferMemory.cpp`: macOS has no udmabuf, so the dma-buf import probe reports it unsupported and buffers stay host memory. - Two tests that hard-code the console's `0xfe0040000` (found by @tkcm01 on an M4): `libSceAgc/tests/StaticBuffer.cpp` now reads the static table at the address the driver uses on macOS. `libSceAgcDriver/tests/execution/ComputeFsTableCalls.cpp` is skipped on macOS, as it already is under `ANYPS5_ENABLE_ASAN`: its shader builds the table address from two `s_mov_b32` literals, and the driver does not rewrite that yet. The gap is listed under Functional in `docs/dev/debt/libSceAgcDriver.md`. The `GuestMemory.cpp` protection reporting is a runtime change, tested below. The other two only choose macOS placement and the host-memory path. ### Overlap and dependencies - `Texture.cpp` was in the first version of this PR. It's dropped: @imellag's #10676 already makes `PendingList::published` build with Apple's libc++, and @maximilianfv's #10859 already keeps sRGB storage images in their UNORM twin. - `FrameRecorder.cpp`'s `environ` declaration is in @maximilianfv's #10540. - @marion909's #7201, which added a competing Apple `describePages` block to `GuestMemory.cpp`, was closed without merging on 27 Oct, so that overlap is gone. Re-checked against all 1,234 open PRs on 27 Oct: none adds more than 7 of this PR's added lines to any of these files, and those shared lines are braces and common includes. ### Tested Apple M2 Pro, macOS 26.6.2, MoltenVK 1.4.2, x86_64 Release under Rosetta 2, with Ninja. On `main` at `2dbe9b99f`, the three `.cpp` files compile; `main` fails all three. Linux and Windows `unifdef -U__APPLE__` views (`-D__linux__` and `-D_WIN32`) equal `main`. `libSceAgcDriver` only links on macOS with the other open macOS PRs. So the runtime check uses a local base: `main` at `b27cc8416`, plus #10552, #10898, #8311 and #9738, local-only patches for the files still failing there, and the changes from #10676, #10859, #10540 and a macOS Vulkan loader for `VulkanDevice.cpp`. That's the base #11303 was tested on. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, 3 runs each: | test | #8658's versions of these files | this PR `922458fb0` | |---|---|---| | `agc_write_tracking` | pass 3/3 | pass 3/3 | | `agc_driver_pooled_buffer_range` | fail 3/3 (needs #11303) | fail 3/3 (needs #11303); pass 3/3 with #11303 | | `agc_driver_image_table_reuse` | fail 3/3 | fail 3/3 | No `VUID` messages in any run. `agc_driver_image_table_reuse` fails the same way with and without this PR ("0 table descriptor writes kept, expected 3"); that is a separate MoltenVK descriptor issue. After the `Lifecycle.cpp` mapping change below (`af1c552ee`), the same base gave the same results: `agc_write_tracking` 3/3, `agc_driver_pooled_buffer_range` with #11303 3/3, `agc_driver_image_table_reuse` failing as before with the device up, and no `VUID`s. The two tests on the same base, 2 runs each: | test | `main`'s test file | this PR (`0b8115c2c`) | |---|---|---| | `agc_static_buffer` | fail 2/2 (Bus error) | pass 2/2 | | `agc_driver_compute_fs_table_calls` | fail 2/2 | skipped 2/2 | Driver-block mapping: the block is mapped at `0xee0000000` with an address hint only, with no `MAP_FIXED`. A standalone x86_64 probe of the old and new `MapDriverMemory` logic placed an unrelated `PROT_NONE` mapping there first. The old logic mapped over it (protection afterwards 3, so it was replaced). The new logic refused, and the unrelated mapping stayed at protection 0. With the address free, both mapped exactly there. @imellag ran this PR's first head on an M4 Pro (see the comment below): `libSceAgcDriver` links, and Planet of Lana reaches gameplay. `python3 tools/check_conventions.py --base origin/main` passes. ### Checklist - [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: #12565 (merge order for `docs/dev/debt/libSceAgcDriver.md`: #10760, then #12565, then this PR, which keeps both edits when it merges `main`); none to compile these files; linking `libSceAgcDriver` on macOS also needs #10540, #10676 and #10859 - [x] Fixes: none - [x] Unblocks: building `libSceAgcDriver` on macOS - [x] GPUs tested: Apple M2 Pro (MoltenVK 1.4.2, macOS 26.6.2); Apple M4 Pro per @imellag - [x] AI-assisted: yes ([Cana](https://cana.build))
MarcZX10 commented 2026-10-26 14:05:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T14:05:12Z.

Review: CHANGES_REQUESTED


I reviewed head d6b304f23e72472410792b45441fecaeb739e41c. The official overlap scan reports exact shared hunks with open #10676 in Texture.cpp's PendingList (std::atomic<std::shared_ptr<...>> versus AtomicSharedPtr) and #10859 in StorageFormatOrUndefined (the sRGB-to-UNORM choice). The PR description also acknowledges overlapping macOS edits with open #7201 in Lifecycle.cpp, GuestMemory.cpp and GuestBufferMemory.cpp, but I could not find an agreed merge order in that PR's discussion. CONTRIBUTING.md says to agree on order and declare it with Depends on; please coordinate the overlapping hunks and update the body accordingly.

This also changes AGC runtime behavior: the new mach_vm_region permission path and Apple sRGB storage selection are more than compile fixes. AGENTS.md requires the same focused Vulkan tests on main and the change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation, with logs checked for missing-layer messages and new VUID- errors. The report only compiles these files and lists GPUs as n/a. Please add the focused macOS/M2 results (or narrow/defer the runtime changes if that validation is unavailable).

The tested base in the description is 9656d366b, while current main is 263fbcd2d3. The file-level diff remains clean against current main and check_conventions.py passes, but please rebase and rerun the focused validation after resolving the overlaps. I did not run macOS tests locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5653221946 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447#pullrequestreview-5653221946). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T14:05:12Z. **Review:** CHANGES_REQUESTED --- I reviewed head `d6b304f23e72472410792b45441fecaeb739e41c`. The official overlap scan reports exact shared hunks with open #10676 in `Texture.cpp`'s `PendingList` (`std::atomic<std::shared_ptr<...>>` versus `AtomicSharedPtr`) and #10859 in `StorageFormatOrUndefined` (the sRGB-to-UNORM choice). The PR description also acknowledges overlapping macOS edits with open #7201 in `Lifecycle.cpp`, `GuestMemory.cpp` and `GuestBufferMemory.cpp`, but I could not find an agreed merge order in that PR's discussion. CONTRIBUTING.md says to agree on order and declare it with `Depends on`; please coordinate the overlapping hunks and update the body accordingly. This also changes AGC runtime behavior: the new `mach_vm_region` permission path and Apple sRGB storage selection are more than compile fixes. AGENTS.md requires the same focused Vulkan tests on `main` and the change with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_LAYER_KHRONOS_validation`, with logs checked for missing-layer messages and new `VUID-` errors. The report only compiles these files and lists GPUs as n/a. Please add the focused macOS/M2 results (or narrow/defer the runtime changes if that validation is unavailable). The tested base in the description is `9656d366b`, while current `main` is `263fbcd2d3`. The file-level diff remains clean against current main and `check_conventions.py` passes, but please rebase and rerun the focused validation after resolving the overlaps. I did not run macOS tests locally.
MarcZX10 commented 2026-10-26 14:42:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T14:42:02Z.

Review: CHANGES_REQUESTED


Re-reviewed exact head 8257104f8c02254c1f846a1ccad8fb5391d4f46e. The new plain-hint mmap path does avoid replacing an unrelated mapping; the PR description now includes an author-run occupied-address/free-address probe for that behavior. Current-main conventions and git diff --check pass, and the merge preview onto current main is clean.

One integration issue remains with open #7201. I compared current heads 6687cbac29cf7a8759329ef95b5ef1349a11b404 and 8257104f8c02254c1f846a1ccad8fb5391d4f46e with a three-way merge preview. Git auto-merges GuestMemory.cpp, but the resulting describePages has two Apple implementations in sequence: #7201’s HostRegions::FirstAtOrAbove block and this PR’s mach_vm_region block. Every path through the first block returns or continues, so the later block is unreachable on macOS. Please coordinate which implementation should remain and resolve the overlap before landing; the overlap is semantic even though Git reports no text conflict.

Hosted conventions/eligibility/labels/report pass; all build jobs are skipped by path policy. I did not run macOS tests locally. The runtime results in the description use a composed base, and the new mapping probe is a separate author-run check; please keep those scopes clear when updating validation after resolving the overlap.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5653815652 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447#pullrequestreview-5653815652). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T14:42:02Z. **Review:** CHANGES_REQUESTED --- Re-reviewed exact head `8257104f8c02254c1f846a1ccad8fb5391d4f46e`. The new plain-hint `mmap` path does avoid replacing an unrelated mapping; the PR description now includes an author-run occupied-address/free-address probe for that behavior. Current-main conventions and `git diff --check` pass, and the merge preview onto current `main` is clean. One integration issue remains with open #7201. I compared current heads `6687cbac29cf7a8759329ef95b5ef1349a11b404` and `8257104f8c02254c1f846a1ccad8fb5391d4f46e` with a three-way merge preview. Git auto-merges `GuestMemory.cpp`, but the resulting `describePages` has two Apple implementations in sequence: #7201’s `HostRegions::FirstAtOrAbove` block and this PR’s `mach_vm_region` block. Every path through the first block returns or continues, so the later block is unreachable on macOS. Please coordinate which implementation should remain and resolve the overlap before landing; the overlap is semantic even though Git reports no text conflict. Hosted conventions/eligibility/labels/report pass; all build jobs are skipped by path policy. I did not run macOS tests locally. The runtime results in the description use a composed base, and the new mapping probe is a separate author-run check; please keep those scopes clear when updating validation after resolving the overlap.
MarcZX10 commented 2026-10-29 03:07:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T03:07:51Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

The overlap and the two address-dependent test issues are addressed. I am keeping changes requested because the current-main-merged PR head has not been built and runtime-tested as an integrated tree. The newest M4 report explicitly says it cherry-picked only the test fix onto an earlier composed tree and did not build the rest of the merged head.

What I ran

  • Inspected current head 0b8115c2c7f6608f614c004bcff660d4cfd2afe8 and its merge with current main 3a2b91981651569163768854a1fcdc7193b6667b.
  • Ran git merge-tree --write-tree upstream/main refs/review/11447-current.
  • Ran python3 tools/check_conventions.py --base upstream/main --head refs/review/11447-current.
  • Ran git diff --check upstream/main...refs/review/11447-current.
  • Reviewed the M2/M4 reports, the update resolving #7201’s competing code path, and the latest hosted checks.

Results

Check Result
Merge preview with current main Clean; tree fc8afbcb480461ece4328a59069c3f72749f939f
Conventions Passed
Diff whitespace Passed
Hosted Windows Passed
Hosted conventions, eligibility, labels, and report Passed
Hosted Linux and specialized jobs Skipped
Author-reported macOS focused tests M2 report covers prior composed tree; M4 report covers a cherry-picked test fix on an earlier tree, not the full current-main-merged head

Negative control

The author reports an occupied-address probe: the old mapping logic replaced an unrelated PROT_NONE mapping, while the new plain-hint mapping refused and left it intact. I did not reproduce this probe locally.

Findings

Blocking

  • Please validate the integrated current-main head on macOS before approval. The PR now merges current main, but the latest M4 comment says the remainder of the new head was not built. The M2 runtime results use the earlier composed base documented in the description. Please run the macOS build and the relevant focused Vulkan tests on a composed tree that includes this exact head, current main, and the required macOS prerequisites. Include the exact tested commit(s), test outcomes, confirmation the validation layer loaded, and whether any new VUID- messages appeared. If the complete driver still cannot link without open prerequisite PRs, state the exact composed tree and ensure it includes the merged current-main changes.

Non-blocking

  • #7201 is closed without merge, so the earlier duplicate describePages implementation concern is resolved.
  • The current PR corrects agc_static_buffer to use the moved macOS table address and skips the shader-literal FS-table test with a corresponding debt entry. The M4 report says those targeted test outcomes are correct, but only for its cherry-picked test fix.

Sources

All current code links are pinned to PR head 0b8115c2c7f6608f614c004bcff660d4cfd2afe8.

Not verified

  • I did not build or run the macOS code locally.
  • I did not independently reproduce either Apple machine’s reported tests or the mapping probe.
  • Current-head macOS runtime behavior and Vulkan validation have not been demonstrated on the integrated tree.

To get to a good state

Build and run the focused macOS validation on an integrated tree containing current main and this head, with the required macOS prerequisites. Report the exact source commits, validation-layer load, focused test results, and any VUID- output.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692384331 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447#pullrequestreview-5692384331). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T03:07:51Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes requested The overlap and the two address-dependent test issues are addressed. I am keeping changes requested because the current-main-merged PR head has not been built and runtime-tested as an integrated tree. The newest M4 report explicitly says it cherry-picked only the test fix onto an earlier composed tree and did not build the rest of the merged head. ## What I ran - Inspected current head `0b8115c2c7f6608f614c004bcff660d4cfd2afe8` and its merge with current `main` `3a2b91981651569163768854a1fcdc7193b6667b`. - Ran `git merge-tree --write-tree upstream/main refs/review/11447-current`. - Ran `python3 tools/check_conventions.py --base upstream/main --head refs/review/11447-current`. - Ran `git diff --check upstream/main...refs/review/11447-current`. - Reviewed the M2/M4 reports, the update resolving #7201’s competing code path, and the latest hosted checks. ## Results | Check | Result | |---|---| | Merge preview with current `main` | Clean; tree `fc8afbcb480461ece4328a59069c3f72749f939f` | | Conventions | Passed | | Diff whitespace | Passed | | Hosted Windows | Passed | | Hosted conventions, eligibility, labels, and report | Passed | | Hosted Linux and specialized jobs | Skipped | | Author-reported macOS focused tests | M2 report covers prior composed tree; M4 report covers a cherry-picked test fix on an earlier tree, not the full current-main-merged head | ## Negative control The author reports an occupied-address probe: the old mapping logic replaced an unrelated `PROT_NONE` mapping, while the new plain-hint mapping refused and left it intact. I did not reproduce this probe locally. ## Findings ### Blocking - **Please validate the integrated current-main head on macOS before approval.** The PR now merges current `main`, but the latest M4 comment says the remainder of the new head was not built. The M2 runtime results use the earlier composed base documented in the description. Please run the macOS build and the relevant focused Vulkan tests on a composed tree that includes this exact head, current `main`, and the required macOS prerequisites. Include the exact tested commit(s), test outcomes, confirmation the validation layer loaded, and whether any new `VUID-` messages appeared. If the complete driver still cannot link without open prerequisite PRs, state the exact composed tree and ensure it includes the merged current-main changes. ### Non-blocking - #7201 is closed without merge, so the earlier duplicate `describePages` implementation concern is resolved. - The current PR corrects `agc_static_buffer` to use the moved macOS table address and skips the shader-literal FS-table test with a corresponding debt entry. The M4 report says those targeted test outcomes are correct, but only for its cherry-picked test fix. ## Sources All current code links are pinned to PR head `0b8115c2c7f6608f614c004bcff660d4cfd2afe8`. - [macOS guest-memory implementation](https://github.com/boykopovar/AnyPS5/blob/0b8115c2c7f6608f614c004bcff660d4cfd2afe8/core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp) - [macOS driver memory placement](https://github.com/boykopovar/AnyPS5/blob/0b8115c2c7f6608f614c004bcff660d4cfd2afe8/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp) - [macOS test adjustment and skip](https://github.com/boykopovar/AnyPS5/blob/0b8115c2c7f6608f614c004bcff660d4cfd2afe8/core/libs/prx/libSceAgcDriver/tests/execution/ComputeFsTableCalls.cpp) - [Author’s M4 report identifying that the full merged head was not built](https://github.com/boykopovar/AnyPS5/pull/11447#issuecomment-6486596400) - [Repository GPU validation requirements](https://github.com/boykopovar/AnyPS5/blob/3a2b91981651569163768854a1fcdc7193b6667b/CONTRIBUTING.md#L65-L70) ## Not verified - I did not build or run the macOS code locally. - I did not independently reproduce either Apple machine’s reported tests or the mapping probe. - Current-head macOS runtime behavior and Vulkan validation have not been demonstrated on the integrated tree. ## To get to a good state Build and run the focused macOS validation on an integrated tree containing current `main` and this head, with the required macOS prerequisites. Report the exact source commits, validation-layer load, focused test results, and any `VUID-` output.
MarcZX10 commented 2026-10-29 06:54:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T06:54:26Z.

Review: APPROVED


Re-reviewed — approved

Reviewed exact PR head 0b8115c2c7f6608f614c004bcff660d4cfd2afe8 against current main edf6804cf52c62eacafc592dd6142cb4efe5bd05.

What I checked

  • Re-read the macOS mapping and buffer-memory changes and the corresponding test adjustments.
  • git merge-tree --write-tree upstream/main refs/review/upstream-11447: clean tree dc09b89f463cfac0341966fffe997104a08cfcfd.
  • git diff --check upstream/main...refs/review/upstream-11447: pass.
  • python3 tools/check_conventions.py --base upstream/main: pass.
  • Compared current main with the reported integrated base 2960e9a6e7 for the relevant GuestMemory.cpp and AGC debt paths; no later changes to those paths were found.
  • Reviewed the new Apple M4 integrated report. It includes this exact PR head, current main at 2960e9a6e7, and the stated macOS prerequisites. The full build linked the driver; the focused AGC run loaded VK_LAYER_KHRONOS_validation, exercised the lifecycle and guest-memory tests, and reports no new VUIDs attributable to this change.

Results

Check Result
Current-main merge preview Clean
Diff check and conventions Pass
macOS integrated build Author reports driver linked; five unrelated test targets failed to build
Focused AGC tests Author reports lifecycle and guest-memory tests passed; agc_static_buffer passed; agc_driver_compute_fs_table_calls skipped with its documented reason
Vulkan validation Author reports layer loaded in 700/701 Vulkan tests; listed VUIDs were attributed to unrelated tests and match earlier runs
Full CTest Author reports 2,548 passed, 53 failed (including 7 not run), 217 skipped; failures and platform limitations are described in the report
Linux, Windows, game runs Not reported for this integrated macOS run

Negative control

A full macOS run without this PR was not possible because the driver does not compile on macOS without the platform changes. The author reports a standalone mapping probe: the old address-hint path replaced an unrelated PROT_NONE mapping, while the new path refused and preserved it. I did not independently reproduce that probe.

Findings

Blocking

None. The new integrated report resolves the prior request for an exact-head/current-main macOS build and focused runtime validation. The reviewed source and test changes are consistent with the results reported.

Non-blocking

  • The full CTest run is not green: 53 failures were reported. Several are explicitly attributed to platform/environment or unrelated tests; the report includes the individual failures and comparison against the earlier composed run.
  • I did not run macOS tests locally. The macOS build, Vulkan validation, VUID classification, and mapping probe are author-reported.
  • The PR body identifies #10859 as still needed to link the macOS driver; preserve that dependency/order when landing the stack.

Sources

Not verified

I did not reproduce the macOS integrated build, focused tests, full CTest run, or negative-control mapping probe locally. Those results are author-reported.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693926717 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447#pullrequestreview-5693926717). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T06:54:26Z. **Review:** APPROVED --- # Re-reviewed — approved Reviewed exact PR head `0b8115c2c7f6608f614c004bcff660d4cfd2afe8` against current `main` `edf6804cf52c62eacafc592dd6142cb4efe5bd05`. ## What I checked - Re-read the macOS mapping and buffer-memory changes and the corresponding test adjustments. - `git merge-tree --write-tree upstream/main refs/review/upstream-11447`: clean tree `dc09b89f463cfac0341966fffe997104a08cfcfd`. - `git diff --check upstream/main...refs/review/upstream-11447`: pass. - `python3 tools/check_conventions.py --base upstream/main`: pass. - Compared current `main` with the reported integrated base `2960e9a6e7` for the relevant `GuestMemory.cpp` and AGC debt paths; no later changes to those paths were found. - Reviewed the new Apple M4 integrated report. It includes this exact PR head, current main at `2960e9a6e7`, and the stated macOS prerequisites. The full build linked the driver; the focused AGC run loaded `VK_LAYER_KHRONOS_validation`, exercised the lifecycle and guest-memory tests, and reports no new VUIDs attributable to this change. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | Diff check and conventions | Pass | | macOS integrated build | Author reports driver linked; five unrelated test targets failed to build | | Focused AGC tests | Author reports lifecycle and guest-memory tests passed; `agc_static_buffer` passed; `agc_driver_compute_fs_table_calls` skipped with its documented reason | | Vulkan validation | Author reports layer loaded in 700/701 Vulkan tests; listed VUIDs were attributed to unrelated tests and match earlier runs | | Full CTest | Author reports 2,548 passed, 53 failed (including 7 not run), 217 skipped; failures and platform limitations are described in the report | | Linux, Windows, game runs | Not reported for this integrated macOS run | ## Negative control A full macOS run without this PR was not possible because the driver does not compile on macOS without the platform changes. The author reports a standalone mapping probe: the old address-hint path replaced an unrelated `PROT_NONE` mapping, while the new path refused and preserved it. I did not independently reproduce that probe. ## Findings ### Blocking None. The new integrated report resolves the prior request for an exact-head/current-main macOS build and focused runtime validation. The reviewed source and test changes are consistent with the results reported. ### Non-blocking - The full CTest run is not green: 53 failures were reported. Several are explicitly attributed to platform/environment or unrelated tests; the report includes the individual failures and comparison against the earlier composed run. - I did not run macOS tests locally. The macOS build, Vulkan validation, VUID classification, and mapping probe are author-reported. - The PR body identifies #10859 as still needed to link the macOS driver; preserve that dependency/order when landing the stack. ## Sources - [PR source at reviewed head](https://github.com/boykopovar/AnyPS5/tree/0b8115c2c7f6608f614c004bcff660d4cfd2afe8/core/libs/prx/libSceAgcDriver) - [Integrated Apple M4 test report](https://github.com/boykopovar/AnyPS5/pull/11447#issuecomment-6489820000) - [Contribution rules at current main](https://github.com/boykopovar/AnyPS5/blob/edf6804cf52c62eacafc592dd6142cb4efe5bd05/CONTRIBUTING.md) ## Not verified I did not reproduce the macOS integrated build, focused tests, full CTest run, or negative-control mapping probe locally. Those results are author-reported.
MarcZX10 commented 2026-10-29 08:30:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:30:51Z.

Review: CHANGES_REQUESTED


Re-reviewed exact head 0b8115c2c7f6608f614c004bcff660d4cfd2afe8 after the new review comment. The implementation and M4 validation remain as reviewed, but the new FS table calls on macOS debt entry still names four games. The repository convention requires titles to be identified by PPSA ID or the #6160 reference; please remove those game names while keeping the supported PPSA IDs/reference. This is a documentation-convention blocker; no code retest is needed for that edit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694808393 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447#pullrequestreview-5694808393). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T08:30:51Z. **Review:** CHANGES_REQUESTED --- Re-reviewed exact head `0b8115c2c7f6608f614c004bcff660d4cfd2afe8` after the new review comment. The implementation and M4 validation remain as reviewed, but the new `FS table calls on macOS` debt entry still names four games. The repository convention requires titles to be identified by PPSA ID or the #6160 reference; please remove those game names while keeping the supported PPSA IDs/reference. This is a documentation-convention blocker; no code retest is needed for that edit.
MarcZX10 commented 2026-10-30 01:53:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T01:53:48Z.

Review: APPROVED


Re-checked — new head, looks good

The reviewed implementation is unchanged; the new head corrects the debt entry and records the dependency order.

What I ran

Reviewed exact head 140c92d3b65c4caa31e18ced01383fc15dd37361 against recorded PR base 319621ba2e578bd053b0baba2877fe70520e0737 and current main 99b571f879cd1ef3de7b8af21261675826d75943. Compared with previously reviewed implementation head 0b8115c2c7f6608f614c004bcff660d4cfd2afe8, the only change is one line in docs/dev/debt/libSceAgcDriver.md. The current-main merge preview is clean (c27e46434a3d8f5b4e2f071055da5fc0603c25c4). Environment: Linux workspace; no build or tests were run locally.

git diff --stat 0b8115c2c7f6608f614c004bcff660d4cfd2afe8..refs/review/session-pr-11447
git merge-tree --write-tree refs/review/session-main refs/review/session-pr-11447
git diff --check refs/review/session-main...refs/review/session-pr-11447
python3 tools/check_conventions.py --base refs/review/session-main --head refs/review/session-pr-11447
gh pr checks 11447 --repo boykopovar/AnyPS5

Results

Check Result
Change since reviewed implementation One documentation line; no source or test changes
Current-main merge preview Clean
Diff check Passed; no output
Conventions Passed
Hosted Windows Job passed; product build and test-run steps were skipped, while host-only test linking passed
Hosted conventions, eligibility, labels, report Passed
Hosted Linux and specialized jobs Skipped
macOS integration evidence The earlier author report on the unchanged implementation describes an Apple M4 integrated build/test run; I did not reproduce it locally
Unedited command output
$ git diff --stat 0b8115c2c7f6608f614c004bcff660d4cfd2afe8..refs/review/session-pr-11447
 docs/dev/debt/libSceAgcDriver.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

$ git merge-tree --write-tree refs/review/session-main refs/review/session-pr-11447
c27e46434a3d8f5b4e2f071055da5fc0603c25c4
$ git diff --check refs/review/session-main...refs/review/session-pr-11447
[no output; exit status 0]
$ python3 tools/check_conventions.py --base refs/review/session-main --head refs/review/session-pr-11447
All conventions checks passed.

$ gh pr checks 11447 --repo boykopovar/AnyPS5
labels	pass	7s	https://github.com/boykopovar/AnyPS5/actions/runs/40985628517/job/123836693774
windows	pass	11m39s	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836981872
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983876
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983998
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836984046
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983627
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983108
conventions	pass	20s	https://github.com/boykopovar/AnyPS5/actions/runs/40985628602/job/123835858284
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123835855018
report	pass	33s	https://github.com/boykopovar/AnyPS5/actions/runs/40985628811/job/123835855118

Findings

Blocking

None found in this re-check.

Non-blocking

The author has recorded #12565 before this PR for the shared debt-file edit. The PR also lists #10859 as needed for macOS linking; #12565 and #10859 remain open, so retain that landing order/dependency state. This approval does not indicate that those dependencies have landed.

Sources

Not verified

I did not run a macOS build, the Apple M4 integration tests, or physical-console tests. The CI Windows job did not build the product or execute tests.

To get this to a good state

Land the declared dependencies in the recorded order before integrating this PR. I will re-check if its head changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5707208734 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11447#pullrequestreview-5707208734). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T01:53:48Z. **Review:** APPROVED --- # Re-checked — new head, looks good The reviewed implementation is unchanged; the new head corrects the debt entry and records the dependency order. ## What I ran Reviewed exact head `140c92d3b65c4caa31e18ced01383fc15dd37361` against recorded PR base `319621ba2e578bd053b0baba2877fe70520e0737` and current `main` `99b571f879cd1ef3de7b8af21261675826d75943`. Compared with previously reviewed implementation head `0b8115c2c7f6608f614c004bcff660d4cfd2afe8`, the only change is one line in `docs/dev/debt/libSceAgcDriver.md`. The current-main merge preview is clean (`c27e46434a3d8f5b4e2f071055da5fc0603c25c4`). Environment: Linux workspace; no build or tests were run locally. ```sh git diff --stat 0b8115c2c7f6608f614c004bcff660d4cfd2afe8..refs/review/session-pr-11447 git merge-tree --write-tree refs/review/session-main refs/review/session-pr-11447 git diff --check refs/review/session-main...refs/review/session-pr-11447 python3 tools/check_conventions.py --base refs/review/session-main --head refs/review/session-pr-11447 gh pr checks 11447 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Change since reviewed implementation | One documentation line; no source or test changes | | Current-main merge preview | Clean | | Diff check | Passed; no output | | Conventions | Passed | | Hosted Windows | Job passed; product build and test-run steps were skipped, while host-only test linking passed | | Hosted conventions, eligibility, labels, report | Passed | | Hosted Linux and specialized jobs | Skipped | | macOS integration evidence | The earlier author report on the unchanged implementation describes an Apple M4 integrated build/test run; I did not reproduce it locally | <details> <summary>Unedited command output</summary> ```text $ git diff --stat 0b8115c2c7f6608f614c004bcff660d4cfd2afe8..refs/review/session-pr-11447 docs/dev/debt/libSceAgcDriver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) $ git merge-tree --write-tree refs/review/session-main refs/review/session-pr-11447 c27e46434a3d8f5b4e2f071055da5fc0603c25c4 $ git diff --check refs/review/session-main...refs/review/session-pr-11447 [no output; exit status 0] $ python3 tools/check_conventions.py --base refs/review/session-main --head refs/review/session-pr-11447 All conventions checks passed. $ gh pr checks 11447 --repo boykopovar/AnyPS5 labels pass 7s https://github.com/boykopovar/AnyPS5/actions/runs/40985628517/job/123836693774 windows pass 11m39s https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836981872 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983876 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983998 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836984046 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983627 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123836983108 conventions pass 20s https://github.com/boykopovar/AnyPS5/actions/runs/40985628602/job/123835858284 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/40985628860/job/123835855018 report pass 33s https://github.com/boykopovar/AnyPS5/actions/runs/40985628811/job/123835855118 ``` </details> ## Findings ### Blocking None found in this re-check. ### Non-blocking The author has recorded #12565 before this PR for the shared debt-file edit. The PR also lists #10859 as needed for macOS linking; #12565 and #10859 remain open, so retain that landing order/dependency state. This approval does not indicate that those dependencies have landed. ## Sources - [Previously reviewed macOS implementation](https://github.com/boykopovar/AnyPS5/tree/0b8115c2c7f6608f614c004bcff660d4cfd2afe8/core/libs/prx/libSceAgcDriver) - [Author's dependency-order and documentation update](https://github.com/boykopovar/AnyPS5/pull/11447#issuecomment-6512613987) - [Author-reported Apple M4 integrated test report](https://github.com/boykopovar/AnyPS5/pull/11447#issuecomment-6489820000) ## Not verified I did not run a macOS build, the Apple M4 integration tests, or physical-console tests. The CI Windows job did not build the product or execute tests. ## To get this to a good state Land the declared dependencies in the recorded order before integrating this PR. I will re-check if its head changes.
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!11447
No description provided.