I am trying to use Vulkan API on my mac OS (with my Intel HD Graphics 5000 1536 Mo).
But when I create an Instance With a VkCreateInstance(...)
the result of VkCreateInstance(...)
is VK_ERROR_INCOMPATIBLE_DRIVER.
Here my code for initialize my VkInstance :
VkApplicationInfo vkAppInfo = {};
vkAppInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
vkAppInfo.pApplicationName = "S2Engine";
vkAppInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
vkAppInfo.pEngineName = "No Engine"; //TODO plus tard
vkAppInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
vkAppInfo.apiVersion = VK_API_VERSION_1_0;
//Obligatoire
VkInstanceCreateInfo vkInstanceCreateInfo = {};
vkInstanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
vkInstanceCreateInfo.pApplicationInfo = &vkAppInfo;
uint32_t glfwExtensionCount = 0;
const char** glfwExtensions ;
glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount);
vkInstanceCreateInfo.enabledExtensionCount = glfwExtensionCount;
vkInstanceCreateInfo.ppEnabledExtensionNames = glfwExtensions;
vkInstanceCreateInfo.enabledLayerCount = 0;
if (vkCreateInstance(&vkInstanceCreateInfo, nullptr /*custom allocator*/, &_vkInstance) != VK_SUCCESS) {
throw std::runtime_error("failed to create instance!");
}
So my question is do the vulkan API is available on my Mac OS with MoltenVK ? If yes, what can I do in order to make my app work ?
glfw
? – Partin