diff options
| author | skallweitNV <64953474+skallweitNV@users.noreply.github.com> | 2024-08-15 17:37:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-15 08:37:10 -0700 |
| commit | 99673d783761d954e7e8333110d104144ae1d51a (patch) | |
| tree | 9e53f2227d5577a5f329bb1290306997ab31cef6 /tools/gfx | |
| parent | 706650f6f6a7a68cb64c269821d8a61edb26a9d0 (diff) | |
fix getVKAdapters on MoltenVK (#4852)
Diffstat (limited to 'tools/gfx')
| -rw-r--r-- | tools/gfx/vulkan/vk-helper-functions.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/vk-helper-functions.cpp b/tools/gfx/vulkan/vk-helper-functions.cpp index b70ff5e04..1f7c6b6ff 100644 --- a/tools/gfx/vulkan/vk-helper-functions.cpp +++ b/tools/gfx/vulkan/vk-helper-functions.cpp @@ -490,9 +490,15 @@ Result SLANG_MCALL getVKAdapters(List<AdapterInfo>& outAdapters) VkInstanceCreateInfo instanceCreateInfo = { VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO }; const char* instanceExtensions[] = { VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, +#if SLANG_APPLE_FAMILY + VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, +#endif }; instanceCreateInfo.enabledExtensionCount = SLANG_COUNT_OF(instanceExtensions); instanceCreateInfo.ppEnabledExtensionNames = &instanceExtensions[0]; +#if SLANG_APPLE_FAMILY + instanceCreateInfo.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; +#endif VkInstance instance; SLANG_VK_RETURN_ON_FAIL(api.vkCreateInstance(&instanceCreateInfo, nullptr, &instance)); |
