-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No ICD Drivers found with MoltenVK [macos] #135
Comments
The following patch seems to fix that ICD exception. But it turns out that MoltenVK does not support Geometry Shaders (at least on my GPU) - so I can't load the tutorials anyway. diff --git a/Sources/Graphics/Devices/Instance.cpp b/Sources/Graphics/Devices/Instance.cpp
index 323e191db..febff8877 100644
--- a/Sources/Graphics/Devices/Instance.cpp
+++ b/Sources/Graphics/Devices/Instance.cpp
@@ -145,6 +145,12 @@ std::vector<const char *> Instance::GetExtensions() const {
if (enableValidationLayers)
extensions.emplace_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
//extensions.emplace_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
+
+#ifdef __APPLE__
+ // macOS specific extensions
+ extensions.emplace_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
+ extensions.emplace_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
+#endif
return extensions;
}
@@ -168,6 +174,7 @@ void Instance::CreateInstance() {
enableValidationLayers = false;
}
+
auto extensions = GetExtensions();
VkInstanceCreateInfo instanceCreateInfo = {};
@@ -176,6 +183,10 @@ void Instance::CreateInstance() {
instanceCreateInfo.enabledExtensionCount = static_cast<uint32_t>(extensions.size());
instanceCreateInfo.ppEnabledExtensionNames = extensions.data();
+#ifdef __APPLE__
+ instanceCreateInfo.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
+#endif
+
#if USE_DEBUG_MESSENGER
VkDebugUtilsMessengerCreateInfoEXT debugUtilsMessengerCreateInfo = {};
#endif
|
The tutorials seem to be broken, see also this editor issue. |
Please see my reply, I may have a fix
Describe the bug
I was able to build everything on my system, with minimal warnings, but when I run the program, I get an exception and vulkan layer errors.
To Reproduce
Expected behaviour*
The tutorial runs
Screenshots
N/A
Hardware:
Additional context
I think maybe Vulkan is being initialized without portability extensions?
I've done very little Vulkan programming, but when I have, I have to add:
The text was updated successfully, but these errors were encountered: