AdamYuan / SparseVoxelOctree

A GPU SVO Builder using rasterization pipeline, a efficient SVO ray marcher and a simple SVO path tracer.
MIT License
629 stars 56 forks source link

Trouble building on MacOS #27

Open GourmandDra opened 11 months ago

GourmandDra commented 11 months ago

Hi! I can't build on MacOS (M1 Pro Ventura 13.3.1), though I do have Vulkan installed and working properly. I'm really new to Vulkan though so sorry if my question is silly.

Error is in dep/myVK/src/glfw/Instance.cpp when calling vkCreateInstance(&create_info, nullptr, &ret->m_instance) it get -9 which translate to VK_ERROR_INCOMPATIBLE_DRIVER

Do you have any idea on how to overcome this?

I tried to do this :

std::vector<const char*> extNames;
const char* extName1 = "VK_KHR_portability_enumeration";
const char* extName2 = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME;
const char* extName3 = "VK_KHR_portability_subset";

extNames.push_back(extName1);
extNames.push_back(extName2);
extNames.push_back(extName3);

VkInstanceCreateInfo create_info = {};

create_info.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
create_info.enabledExtensionCount = static_cast<uint32_t>(extNames.size());
create_info.ppEnabledExtensionNames = extNames.data();

create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
create_info.pApplicationInfo = &app_info;

in dep/myVK/src/glfw/Instance.cpp as stated in Vulkan docs, but it does not change anything.

Thanks!

AdamYuan commented 11 months ago

Sorry, I don't have a macbook so I'm not able to test it myself. It is said that vulkan applications can run on macos with MoltenVK installed, but I see a lot of reported issues about it. Have you tried running some vulkan demos (for example, vkcube) ?