Skip to content

test(agc): load the Vulkan loader by its macOS name in the host import and producer gate helpers - #11706

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
jotitadev:fix/agc-guest-memory-lifetime-macos-loader
Oct 28, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
jotitadev:fix/agc-guest-memory-lifetime-macos-loader

Conversation

@jotitadev

@jotitadev jotitadev commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

GuestMemoryLifetimeHasHostImports (the host import query of the agc_driver_guest_memory_lifetime* tests) and the producer submission gate of agc_driver_indirect_arguments_pending_producer open libvulkan.so.1 on every host that isn't Windows. On macOS that file doesn't exist, so the 7 tests stop with cannot load Vulkan for the host import capability query / cannot load Vulkan for the producer submission gate before they test anything. Both now open libvulkan.1.dylib on macOS, as DepthStorage.cpp, PooledBufferRange.cpp and the other driver tests already do. Both only resolve vkGetDeviceProcAddr for the driver's existing device, so they need no portability enumeration.

Tested

macOS 27.2, Apple M2 Max, x86_64 Release under Rosetta 2. main alone doesn't build on macOS yet, so this ran on main 27ad7244d2 plus the open macOS build PRs (#10366, #7631, #10659, #10660, #11249, #11358, #10669, #10552, #7804, #10540, #10676, #11447, #11437), #11554 and #11705. ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.

  • agc_driver_guest_memory_lifetime, _copy, _direct, _locked, _heap, _heap_uncached and agc_driver_indirect_arguments_pending_producer: all 7 fail without this change with the messages above, and pass with it on MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and on MoltenVK main + MSL: Preserve negative zero in precise multiplication KhronosGroup/SPIRV-Cross#2704. The verbose log shows they run to the end (guest memory host import lifetime passed, the six indirect arguments pending producer cases passed), not a skip.
  • The same 7 with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1, ctest -V: all pass, the layer loads, no VUID- errors. Without the change they stop at the loader load, so there is no full run to compare against.
  • Linux and Windows keep their names; the change is the __APPLE__ branch only.
  • 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: none (the tests reach this code on macOS once fix(agc): load the Vulkan loader and list MoltenVK on macOS #11554 is in)
  • Unblocks: none
  • GPUs tested: Apple M2 Max (MoltenVK 1.4.2, Vulkan SDK 1.4.363.0; and MoltenVK main + SPIRV-Cross#2704), macOS 27.2
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

…t and producer gate helpers

The guest memory lifetime tests' host import query and the indirect
arguments pending producer gate opened libvulkan.so.1 on every
non-Windows host, so on macOS they failed with "cannot load Vulkan"
before running. They now open libvulkan.1.dylib there, as the other
driver tests do.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 54143904099eee1dd7bd7c45125e581872cc7db0 against current main ddd72f488b6070c3864c8782cc5691ca3e30e680. Approve; no actionable findings.

Both changes add the existing macOS Vulkan loader name, libvulkan.1.dylib, while preserving the Windows and Linux names. I verified the same platform-specific loader pattern in current AGC execution tests (DepthStorage.cpp and related files); these helpers only resolve vkGetDeviceProcAddr for an already-created device, so they do not need instance portability-enumeration handling.

The author reports reproducing all seven failures before the change and passing them after it on macOS/MoltenVK, including a required validation-layer run with no VUIDs. Current hosted eligibility, intake, labels, report and conventions pass; the product jobs are skipped by path policy, so I am not counting them as execution of these tests. The current-main conventions and git diff --check pass.

@adriadam10 adriadam10 self-assigned this Oct 27, 2026
@github-actions github-actions Bot added the agc libSceAgc* label Oct 27, 2026
@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 5414390409, merged into main f759e165d9 (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84; Vulkan loader 1.4.357 from the NVIDIA driver), WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

The tree also carried the open PRs #11724, #11644, #11639, #11636, #11635, #11630, #11353, #11347, #11221, #10925, #11693, #11686, #11682, all merged cleanly, so the run is a joint one. The tests touching this PR's files: agc_driver_indirect_arguments_pending_producer passed (1.18 s), and the host-import lifetime tests that include GuestMemoryLifetimeSupport.hpp (agc_host_import_cut_lifetime, agc_driver_host_import_lifetime, agc_driver_host_import_lifetime_other_family, agc_driver_host_import_windows and the rest of ^agc_(driver_)?host_import, 12 passed, agc_host_import_sparse skipped as on main). The macOS loader name itself is not exercised here; this confirms the Windows path still loads vulkan-1.dll. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@adriadam10
adriadam10 merged commit b4b0c22 into boykopovar:main Oct 28, 2026
12 of 13 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked that libvulkan.1.dylib is the loader name the other AGC driver tests already use on macOS, that the Linux and Windows names are untouched, and that both helpers only resolve vkGetDeviceProcAddr for the existing device, so no portability enumeration is needed. The macOS run is the author's and @MarcZX10's review; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants