test(agc): load the Vulkan loader with portability enumeration in four more fixtures on macOS #12927

Merged
tkcm01 merged 1 commit from upstream-pr/12927 into main 2026-10-30 04:52:29 +00:00
tkcm01 commented 2026-10-29 14:48:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tkcm01 on 2026-10-29T14:48:50Z.


What

Four AGC test fixtures open their own Vulkan instance: tests/BdaDevice.cpp, tests/Recorder.cpp, tests/execution/OversizedDescriptorSets.cpp and tests/execution/SampledCacheBudget.cpp. Outside Windows they load only libvulkan.so.1, and they create the instance without portability enumeration. So on macOS they cannot load Vulkan. 87 of the 96 tests their four executables run skip with cannot load Vulkan, and they fail under ANYPS5_REQUIRE_VULKAN=1.

On macOS each fixture now loads libvulkan.1.dylib and creates the instance with VK_KHR_portability_enumeration and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR. This is the same eight lines #7886 added to the nine other fixtures that open their own device. Device creation is unchanged: enabling VK_KHR_portability_subset there is #10920. Test-only; Linux and Windows compile the same code as before.

@mugurc's ci/macos-series-2 has this for Recorder.cpp. @jermainee found it for OversizedDescriptorSets and SampledCacheBudget on #1 (9 October). Both are credited as co-authors. Announced on #1.

Tested

macOS 27.2 (26B123), Apple M4 (10-core GPU), Apple clang 21.0.0, x86-64 Release under Rosetta 2, MoltenVK 1.4.2 from the Vulkan SDK 1.4.363.0.

libSceAgcDriver doesn't link on macOS from main alone. So the tree is main 2960e9a6e7 plus #7631, #7804, #10552, #11249, #11447, #10669, #11554 and #12076, the list from #1. The four files are the same there as on current main.

The 96 tests of agc_driver_bda_device_tests, agc_driver_recorder_tests, agc_driver_oversized_descriptor_sets_tests and agc_driver_sampled_cache_budget_tests, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

passed skipped failed
without this change 9 0 87, all cannot load Vulkan
with it (2 runs, the same each time) 92 2 2
  • Plain ctest without ANYPS5_REQUIRE_VULKAN:
    • Without the change: 9 passed and 87 skipped.
    • With it: 92 passed, 2 skipped and the same 2 failed.
  • The 2 skips:
    • agc_driver_oversized_descriptor_sets: the M4 binds fewer than 4097 storage buffers per stage.
    • agc_import_settle_initial_dcc: imports under 1 MiB wait for a deferred settle only on Windows.
  • The 2 failures are existing macOS gaps that these tests now reach:
    • agc_driver_recover_srgb_allocation: "the storage surface cannot serve an sRGB expansion copy". This is the failure #10859 describes and fixes.
    • agc_recorder_failed_check: the test's deliberate uncaught throw ends in libc++abi's terminate, so ctest sees an abort. This is the "Exception runtime on macOS" entry in docs/dev/debt/libc.md. The expected message is printed.
  • Validation:
    • Without the change: no VUID- lines, since no device was created.
    • With it: only VUID-VkDeviceCreateInfo-pProperties-04451, once per device these fixtures create. That is the missing VK_KHR_portability_subset that #10920 adds; this PR's four files merge with #10920 without conflicts.
  • Windows, through the fork's Build workflow on this change merged with main: the 3027 selected tests passed. The four executables build. Of their tests that were selected, 4 CPU-only ones passed and 30 skipped, because the runner has no GPU.
  • python3 tools/check_conventions.py --base upstream/main: passed.
  • tools/pr_overlap.py: #10920 touches the same four files, in device creation. The two merge cleanly.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Apple M4 (10-core GPU), MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5070191698 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12927). Originally posted by [tkcm01](https://github.com/tkcm01) on 2026-10-29T14:48:50Z. --- ### What Four AGC test fixtures open their own Vulkan instance: `tests/BdaDevice.cpp`, `tests/Recorder.cpp`, `tests/execution/OversizedDescriptorSets.cpp` and `tests/execution/SampledCacheBudget.cpp`. Outside Windows they load only `libvulkan.so.1`, and they create the instance without portability enumeration. So on macOS they cannot load Vulkan. 87 of the 96 tests their four executables run skip with `cannot load Vulkan`, and they fail under `ANYPS5_REQUIRE_VULKAN=1`. On macOS each fixture now loads `libvulkan.1.dylib` and creates the instance with `VK_KHR_portability_enumeration` and `VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR`. This is the same eight lines #7886 added to the nine other fixtures that open their own device. Device creation is unchanged: enabling `VK_KHR_portability_subset` there is #10920. Test-only; Linux and Windows compile the same code as before. @mugurc's `ci/macos-series-2` has this for `Recorder.cpp`. @jermainee found it for `OversizedDescriptorSets` and `SampledCacheBudget` on #1 (9 October). Both are credited as co-authors. Announced on #1. ### 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.2 (26B123), Apple M4 (10-core GPU), Apple clang 21.0.0, x86-64 Release under Rosetta 2, MoltenVK 1.4.2 from the Vulkan SDK 1.4.363.0. `libSceAgcDriver` doesn't link on macOS from `main` alone. So the tree is `main` `2960e9a6e7` plus #7631, #7804, #10552, #11249, #11447, #10669, #11554 and #12076, the list from #1. The four files are the same there as on current `main`. The 96 tests of `agc_driver_bda_device_tests`, `agc_driver_recorder_tests`, `agc_driver_oversized_descriptor_sets_tests` and `agc_driver_sampled_cache_budget_tests`, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`: | | passed | skipped | failed | |---|---|---|---| | without this change | 9 | 0 | 87, all `cannot load Vulkan` | | with it (2 runs, the same each time) | 92 | 2 | 2 | - Plain `ctest` without `ANYPS5_REQUIRE_VULKAN`: - Without the change: 9 passed and 87 skipped. - With it: 92 passed, 2 skipped and the same 2 failed. - The 2 skips: - `agc_driver_oversized_descriptor_sets`: the M4 binds fewer than 4097 storage buffers per stage. - `agc_import_settle_initial_dcc`: imports under 1 MiB wait for a deferred settle only on Windows. - The 2 failures are existing macOS gaps that these tests now reach: - `agc_driver_recover_srgb_allocation`: "the storage surface cannot serve an sRGB expansion copy". This is the failure #10859 describes and fixes. - `agc_recorder_failed_check`: the test's deliberate uncaught throw ends in libc++abi's terminate, so ctest sees an abort. This is the "Exception runtime on macOS" entry in `docs/dev/debt/libc.md`. The expected message is printed. - Validation: - Without the change: no `VUID-` lines, since no device was created. - With it: only `VUID-VkDeviceCreateInfo-pProperties-04451`, once per device these fixtures create. That is the missing `VK_KHR_portability_subset` that #10920 adds; this PR's four files merge with #10920 without conflicts. - Windows, through the fork's Build workflow on this change merged with `main`: the 3027 selected tests passed. The four executables build. Of their tests that were selected, 4 CPU-only ones passed and 30 skipped, because the runner has no GPU. - `python3 tools/check_conventions.py --base upstream/main`: passed. - `tools/pr_overlap.py`: #10920 touches the same four files, in device creation. The two merge cleanly. ### 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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: Apple M4 (10-core GPU), MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2 <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!12927
No description provided.