Merge pull request #16 from devnexen/volkloadinstance_postpone

QVk_Init: Load instance data only on success.
This commit is contained in:
Denis Pauk 2022-06-26 13:50:20 +03:00 committed by GitHub
commit bfd5659abc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1824,13 +1824,13 @@ qboolean QVk_Init(void)
VkResult res = vkCreateInstance(&createInfo, NULL, &vk_instance); VkResult res = vkCreateInstance(&createInfo, NULL, &vk_instance);
free(wantedExtensions); free(wantedExtensions);
volkLoadInstance(vk_instance);
if (res != VK_SUCCESS) if (res != VK_SUCCESS)
{ {
R_Printf(PRINT_ALL, "%s(): Could not create Vulkan instance: %s\n", __func__, QVk_GetError(res)); R_Printf(PRINT_ALL, "%s(): Could not create Vulkan instance: %s\n", __func__, QVk_GetError(res));
return false; return false;
} }
volkLoadInstance(vk_instance);
R_Printf(PRINT_ALL, "...created Vulkan instance\n"); R_Printf(PRINT_ALL, "...created Vulkan instance\n");
if (vk_validation->value) if (vk_validation->value)