diff options
author | Richard S. Wright Jr. <richard@lunarg.com> | 2024-02-28 11:58:06 -0500 |
---|---|---|
committer | Richard S. Wright Jr. <richard@lunarg.com> | 2024-02-28 11:58:06 -0500 |
commit | 0fb67ac2433db404a54da2ba6e0042d38cdbf883 (patch) | |
tree | d4f58a6863938945633e41f20142a10b4f2c7238 | |
parent | 5982311be42f8277cad11ae4637c80ab69c79ce5 (diff) | |
download | volk-0fb67ac2433db404a54da2ba6e0042d38cdbf883.tar.gz |
apple: Add support for loader or moltenvk in a framework
-rw-r--r-- | volk.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -72,6 +72,12 @@ VkResult volkInitialize(void) module = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL); if (!module) module = dlopen("libMoltenVK.dylib", RTLD_NOW | RTLD_LOCAL); + // Add support for using Vulkan and MoltenVK in a Framework. App store rules for iOS + // strictly enforce no .dylib's. If they aren't found it just falls through + if (!module) + module = dlopen("vulkan.framework/vulkan", RTLD_NOW | RTLD_LOCAL); + if (!module) + module = dlopen("MoltenVK.framework/MoltenVK", RTLD_NOW | RTLD_LOCAL); // modern versions of macOS don't search /usr/local/lib automatically contrary to what man dlopen says // Vulkan SDK uses this as the system-wide installation location, so we're going to fallback to this if all else fails if (!module && getenv("DYLD_FALLBACK_LIBRARY_PATH") == NULL) |