test(agc): load the Vulkan loader with portability enumeration on macOS #7886
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7886"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T12:25:28Z.
What
Nine AGC test fixtures create their own Vulkan instance instead of going through
VulkanDevice:PresentationPass.cpp,PerformanceOverlay.cppand, undertests/execution/,DepthPlaneGuestLayers.cpp,DepthStorage.cpp,DepthSurfaceLastWriter.cpp,NativeMultisampleDepth.cpp,PartiallyResidentSnapshot.cpp,PooledBufferRange.cppandSparseBufferHoles.cpp. On macOS they loadlibvulkan.so.1, which doesn't exist there, so they printskipped, no usable Vulkan device: AGC graphics: cannot load Vulkanand ctest counts them as skipped. Alibvulkan.so.1symlink isn't enough: withoutVK_KHR_portability_enumerationthe loader doesn't list MoltenVK andvkCreateInstancereturns -9 (VK_ERROR_INCOMPATIBLE_DRIVER).On
__APPLE__they now loadlibvulkan.1.dyliband create the instance withVK_KHR_portability_enumerationandVK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR. This is the same change mugurc's macOS series makes toBdaDevice.cpp,Recorder.cpp,OversizedDescriptorSets.cppandSampledCacheBudget.cpp(#1, branchci/macos-series-2, commit20ee39de9a). These nine fixtures aren't covered there, and the current head of #7332 doesn't cover them either. Windows and Linux are unchanged.I noticed this while validating #6557: its new test case in
NativeMultisampleDepth.cppnever ran on macOS.Tested
Apple M2 Max, macOS 27.2, x86-64 build under Rosetta 2, Xcode 27.
maindoesn't build on macOS yet, so the tree ismaina373e85e5+ mugurc'sci/macos-series-291e4eccaf + #6667, #6668, #7524 and #6969, + two files of #7332 (DirectMemory/Jit.cpp,tests/GuestMemoryLifetimeSupport.hpp), with this commit's diff applied cleanly on top. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704. Run with-j1 --timeout 30.11 ctest entries use these fixtures. Before this change all 11 were skipped. With it:
agc_driver_presentation_passagc_performance_overlay_device_selectionagc_driver_depth_plane_guest_layersagc_driver_depth_storageagc_driver_depth_surface_last_writeragc_driver_native_multisample_depthagc_driver_partially_resident_snapshotagc_driver_partially_resident_pending_storesagc_driver_sparse_buffer_holesagc_performance_overlaythe process's private memory cannot be readagc_driver_pooled_buffer_rangea robust read of word 28 of a 100-byte pooled buffer returned 0xabababab, the bytes a 256-byte earlier user left in its memoryResults are the same on both drivers, and 3 of 3 with
--repeat until-fail:3on MoltenVK 1.4.2.The two failures were already there; the tests just weren't running:
agc_performance_overlayfails the same wayagc_performance_overlay_statisticsalready fails on macOS.ReadProcessPrivateBytesreads/proc/self/statuson every host that isn't Windows. Locally, readingtask_info(TASK_VM_INFO).phys_footprinton macOS made it pass. #7332 already has that fix, so it is left out of this PR.agc_driver_pooled_buffer_range: MoltenVK reportsrobustBufferAccess, but the read past the end of a 100-byte buffer still returns bytes from the pooled memory behind it. So the test catches the stale data on Apple. This is MoltenVK behaviour and isn't changed here.python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code