summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/vk-module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx/vulkan/vk-module.cpp')
-rw-r--r--tools/gfx/vulkan/vk-module.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/vk-module.cpp b/tools/gfx/vulkan/vk-module.cpp
index cff75569e..0e4df8e7f 100644
--- a/tools/gfx/vulkan/vk-module.cpp
+++ b/tools/gfx/vulkan/vk-module.cpp
@@ -32,6 +32,9 @@ Slang::Result VulkanModule::init(bool useSoftwareImpl)
dynamicLibraryName = useSoftwareImpl ? "vk_swiftshader.dll" : "vulkan-1.dll";
HMODULE module = ::LoadLibraryA(dynamicLibraryName);
m_module = (void*)module;
+#elif SLANG_APPLE_FAMILY
+ dynamicLibraryName = useSoftwareImpl ? "libvk_swiftshader.dylib" : "libvulkan.1.dylib";
+ m_module = dlopen(dynamicLibraryName, RTLD_NOW | RTLD_GLOBAL);
#else
dynamicLibraryName = useSoftwareImpl ? "libvk_swiftshader.so" : "libvulkan.so.1";
if (useSoftwareImpl)