test(agc): build the pipelined flush read order test on hosts without MAP_FIXED_NOREPLACE #25227

Closed
Gonic0 wants to merge 1 commit from upstream-pr/25227 into main
Gonic0 commented 2026-11-21 19:40:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gonic0 on 2026-11-21T19:40:33Z.


What

agc_driver_pipelined_flush_read_order_tests no longer builds on macOS since 75241b2631 (#18809):

PipelinedFlushReadOrder.cpp:232:21: error: use of undeclared identifier 'mapped'

macOS has no MAP_FIXED_NOREPLACE, so TestMultisampledSingleClearDrainsDrawPipeline took the branch that only returns, and the code after it still used mapped, which that branch never declares. The case's body is now compiled only where it can map its fixed block (_WIN32 or MAP_FIXED_NOREPLACE), and the function is empty elsewhere, which is what the early return meant. Linux and Windows compile the same code as before. The driver is unchanged.

Tested

macOS 27.3, Apple M5 Pro, Apple clang, x86-64 Release under Rosetta 2, BUILD_TESTING=ON. Tree: main 6d55d9b269 (which already has #18809) plus #17425, #11049 and #25116, which main still needs to build on macOS (#24117). This branch is rebased onto main 8763aeffdc, which has not changed this file since.

ctest --test-dir build -R pipelined_flush_read_order -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer, on MoltenVK from Vulkan SDK 1.4.363.0 (validation layer 1.4.363):

  • main: the test executable does not compile on macOS, so there is no main log to compare.
  • This change: agc_driver_pipelined_flush_read_order, ..._draw_pipeline and ..._plan_verify pass in 3 of 3 runs. Every run's log shows Insert instance layer "VK_LAYER_KHRONOS_validation" for each test, none shows was not found but was requested by env var VK_INSTANCE_LAYERS, and none has a VUID- message.
  • Linux and Windows: not built; the preprocessor condition keeps their code identical.
  • tools/check_conventions.py passes; tools/pr_overlap.py --branch finds no overlap with open pull requests.

Not part of this change: I also tried running the multisampled case on macOS by reserving the fixed block through GuestArena::GuestArenaAllocateFromHint_nid_postfix. The arena returns 0x20f7f0000, but the driver then throws AGC graphics: guest texture descriptor has a null base address, while the other two cases pass. That looks like a macOS difference in the AGC path, not in the test, and needs its own investigation.

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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Apple M5 Pro, MoltenVK from Vulkan SDK 1.4.363.0, macOS 27.3
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5431697706 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25227). Originally posted by [Gonic0](https://github.com/Gonic0) on 2026-11-21T19:40:33Z. --- ### What `agc_driver_pipelined_flush_read_order_tests` no longer builds on macOS since 75241b2631 (#18809): ``` PipelinedFlushReadOrder.cpp:232:21: error: use of undeclared identifier 'mapped' ``` macOS has no `MAP_FIXED_NOREPLACE`, so `TestMultisampledSingleClearDrainsDrawPipeline` took the branch that only returns, and the code after it still used `mapped`, which that branch never declares. The case's body is now compiled only where it can map its fixed block (`_WIN32` or `MAP_FIXED_NOREPLACE`), and the function is empty elsewhere, which is what the early return meant. Linux and Windows compile the same code as before. The driver is unchanged. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> macOS 27.3, Apple M5 Pro, Apple clang, x86-64 Release under Rosetta 2, `BUILD_TESTING=ON`. Tree: `main` `6d55d9b269` (which already has #18809) plus #17425, #11049 and #25116, which `main` still needs to build on macOS (#24117). This branch is rebased onto `main` `8763aeffdc`, which has not changed this file since. `ctest --test-dir build -R pipelined_flush_read_order -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and `VK_LOADER_DEBUG=layer`, on MoltenVK from Vulkan SDK 1.4.363.0 (validation layer 1.4.363): - `main`: the test executable does not compile on macOS, so there is no `main` log to compare. - This change: `agc_driver_pipelined_flush_read_order`, `..._draw_pipeline` and `..._plan_verify` pass in 3 of 3 runs. Every run's log shows `Insert instance layer "VK_LAYER_KHRONOS_validation"` for each test, none shows `was not found but was requested by env var VK_INSTANCE_LAYERS`, and none has a `VUID-` message. - Linux and Windows: not built; the preprocessor condition keeps their code identical. - `tools/check_conventions.py` passes; `tools/pr_overlap.py --branch` finds no overlap with open pull requests. Not part of this change: I also tried running the multisampled case on macOS by reserving the fixed block through `GuestArena::GuestArenaAllocateFromHint_nid_postfix`. The arena returns `0x20f7f0000`, but the driver then throws `AGC graphics: guest texture descriptor has a null base address`, while the other two cases pass. That looks like a macOS difference in the AGC path, not in the test, and needs its own investigation. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Apple M5 Pro, MoltenVK from Vulkan SDK 1.4.363.0, macOS 27.3 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

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!25227
No description provided.