Giter Club home page Giter Club logo

Comments (2)

mPorst avatar mPorst commented on July 16, 2024 1

The tutorials seem to be broken, see also this editor issue.
I'm in the process of getting into the engine, the TestPhysics works on my devices (windows and linux) but seems to depend on a large ecosystem of additional classes (scene, camera, ui, ...)
I tried to get tutorial1 running and I'm currently stuck at the fact that at some point the camera is queried but returns a nullptr. So I try to figure out how to create a scene...
Anyway, I can't directly answer your question but hope the info helps you :)

from acid.

s-daveb avatar s-daveb commented on July 16, 2024

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

from acid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.