Fixed MoltenVK on Mac to reflect new requirements (#2972)
This commit is contained in:
parent
f26fbaf1b8
commit
54ade6e888
@ -1220,13 +1220,21 @@ VK_IMPORT
|
||||
BX_TRACE("\t%s", layer.m_name);
|
||||
}
|
||||
}
|
||||
#if BX_PLATFORM_OSX
|
||||
uint32_t numEnabledExtensions = headless ? 0 : 3;
|
||||
|
||||
const char* enabledExtension[Extension::Count + 3] =
|
||||
#else
|
||||
uint32_t numEnabledExtensions = headless ? 0 : 2;
|
||||
|
||||
const char* enabledExtension[Extension::Count + 2] =
|
||||
#endif
|
||||
{
|
||||
VK_KHR_SURFACE_EXTENSION_NAME,
|
||||
KHR_SURFACE_EXTENSION_NAME,
|
||||
#if BX_PLATFORM_OSX
|
||||
VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
|
||||
#endif
|
||||
};
|
||||
|
||||
for (uint32_t ii = 0; ii < Extension::Count; ++ii)
|
||||
@ -1288,7 +1296,11 @@ VK_IMPORT
|
||||
VkInstanceCreateInfo ici;
|
||||
ici.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
ici.pNext = NULL;
|
||||
#if BX_PLATFORM_OSX
|
||||
ici.flags = 0 | VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
||||
#else
|
||||
ici.flags = 0;
|
||||
#endif
|
||||
ici.pApplicationInfo = &appInfo;
|
||||
ici.enabledLayerCount = numEnabledLayers;
|
||||
ici.ppEnabledLayerNames = enabledLayer;
|
||||
@ -1767,13 +1779,21 @@ VK_IMPORT_INSTANCE
|
||||
BX_TRACE("\t%s", layer.m_name);
|
||||
}
|
||||
}
|
||||
#if BX_PLATFORM_OSX
|
||||
uint32_t numEnabledExtensions = headless ? 1 : 3;
|
||||
|
||||
const char* enabledExtension[Extension::Count + 3] =
|
||||
#else
|
||||
uint32_t numEnabledExtensions = headless ? 1 : 2;
|
||||
|
||||
const char* enabledExtension[Extension::Count + 2] =
|
||||
#endif
|
||||
{
|
||||
VK_KHR_MAINTENANCE1_EXTENSION_NAME,
|
||||
VK_KHR_SWAPCHAIN_EXTENSION_NAME
|
||||
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
|
||||
#if BX_PLATFORM_OSX
|
||||
"VK_KHR_portability_subset",
|
||||
#endif
|
||||
};
|
||||
|
||||
for (uint32_t ii = 0; ii < Extension::Count; ++ii)
|
||||
|
Loading…
Reference in New Issue
Block a user