Skip to content

Commit

Permalink
fix getVKAdapters on MoltenVK (shader-slang#4852)
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV authored Aug 15, 2024
1 parent 706650f commit 99673d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/gfx/vulkan/vk-helper-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 99673d7

Please sign in to comment.