(macOS arm64) Support loading VK ICDs (in preparation for KosmicKrisp), fix arm64 CI fails #17735
+60
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes some key changes to the arm64 macOS buildscripts, alongside changes to Vulkan init code on Mac, to enable linking these builds to the Vulkan Loader instead of MoltenVK directly, and then loading any installable-client-driver (ICD) (including so-called 'portability' ICDs like MoltenVK).
Notes:
I've switched swapchains to use VK_EXT_metal_surface for future compatibility with KosmicKrisp, but as this ext requires a CAMetalLayer I've had to add a little OBJC shim to get the metal layer out of the NSView. Unaware of any better alternatives atm.
For instance init I've had to force the 'fast' path on macOS to load 2 extensions needed so that 'portability'/non-conformant drivers like MoltenVK get detected on startup.
I haven't changed anything about the Intel build scripts given they will only have one driver option for the remainder of Intel macOS' life (MVK, as KK only supports M1+). A brief check from Intel users to see if these builds still work fine would be handy.