summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/vk-module.cpp
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2023-12-19 00:16:14 +0100
committerGitHub <noreply@github.com>2023-12-18 15:16:14 -0800
commit93b8f68b2e9ddc450ce63f1b6e1806960312d803 (patch)
treed5c9c38efe1e7c86637c4be6157595b44a5c4856 /tools/gfx/vulkan/vk-module.cpp
parentb6da04424aff71ddba9629c94401a9a897b152a0 (diff)
macos/vulkan support (#3418)
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)