I'm trying to create a VkInstance to get started with Vulkan and I've already run into an undocumented error. This is all the code that I have so far:
VkApplicationInfo applicationInfo = {};
applicationInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
applicationInfo.pNext = NULL;
applicationInfo.pApplicationName = "<game>";
applicationInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
applicationInfo.pEngineName = "<engine>";
applicationInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
applicationInfo.apiVersion = VK_API_VERSION_1_0;
// setup the instance info
VkInstanceCreateInfo instanceInfo = {};
instanceInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
instanceInfo.pNext = NULL;
instanceInfo.flags = 0;
instanceInfo.pApplicationInfo = &applicationInfo;
instanceInfo.enabledLayerCount = 0;
instanceInfo.ppEnabledExtensionNames = NULL;
instanceInfo.enabledExtensionCount = 0;
instanceInfo.ppEnabledLayerNames = NULL;
// create the vk instance which is used to do stuff in vulkan
VkInstance instance;
VkResult result = vkCreateInstance(&instanceInfo, NULL, &instance);
the result after this is VK_OUT_OF_HOST_MEMORY. All the documentation says about this is that vkCreateInstance might return this. Super helpful -_-. What am I missing here?