getting VK_ERROR_OUT_OF_HOST_MEMORY during vkCreateInstance on surface pro 4

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 = {
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 = {
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.

Getting VK_ERROR_OUT_OF_HOST_MEMORY seems to be a bug, and in reality says that your device does not support Vulkan.

Intel’s Vulkan driver support for Windows is sadly lacking and only 6th Gen CPUs are supported. But according to their page, the GPU from the Surface 4 pro should work.

What drivers do you have installed? Main line afaik doesn’t include Vulkan support, so you have to use this beta driver from march : Vulkan BETA Graphics Driver for Windows® 7/8.1/10...

ah ok thanks a lot! i’ll try out the beta driver.

i was using the driver from the main line so that’s probably the reason. cause i saw that intel is supporting that card, so i thought it was supported on the mainline driver too, didnt thought of using the beta driver

thanks! got it working!

finally able to create vulkan instance after using the beta driver, hope it works fine for the rest of the stuff…

For anyone googling this error, this may also occur if you have a corrupted driver installation.

For me it was after I swapped an NVidia card for an AMD card, then swapped back. I needed to fully uninstall the AMD driver packages.