I was trying to test out vulkan but kept getting VK_ERROR_OUT_OF_HOST_MEMORY from vkCreateInstance, below is the code i used to initialize it:
[NOTE] VkApplicationInfo appInfo = {
VK_STRUCTURE_TYPE_APPLICATION_INFO, // VkStructureType sType
nullptr, // const void *pNext
“AlphaProject”, // const char *pApplicationName
VK_MAKE_VERSION(1, 0, 0), // uint32_t applicationVersion
“NovaEngine”, // const char *pEngineName
VK_MAKE_VERSION(1, 0, 0), // uint32_t engineVersion
VK_API_VERSION_1_0 // uint32_t apiVersion
};
VkInstanceCreateInfo instanceCreateInfo = {
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, // VkStructureType sType
nullptr, // const void* pNext
0, // VkInstanceCreateFlags flags
&appInfo, // const VkApplicationInfo *pApplicationInfo
0, // uint32_t enabledLayerCount
nullptr, // const char * const *ppEnabledLayerNames
0, // uint32_t enabledExtensionCount
nullptr // const char * const *ppEnabledExtensionNames
};
VkResult result = vkCreateInstance(&instanceCreateInfo, nullptr, &mInstance);[/NOTE]
Since the error was insufficient host memory, I tried writing a simple allocator and passed it in instead of using the default and it never ever returns nullptr for the allocate function.
I’m at a lost on what to do, is there any other way i can debug what’s going on here? cause i can’t step into the vkCreateInstance either.
anyone managed to get vulkan working on surface pro 4? I’m hoping it’s a user error rather than a driver issue…
I have the latest surface pro 4 graphic driver installed, also verified that it’s using the latest intel 520 graphic driver.
Also, i’m using it with a 64bit vulkan lib on a 64bit program, will test it with 32bit vulkan lib later on to see if it works.