Win32: Fix bad error from glfwVulkanSupported

A VK_ERROR_OUT_OF_HOST_MEMORY error would be passed on to client code on
systems that had a Vulkan loader but no ICD.

Fixes #916.
This commit is contained in:
Camilla Löwy
2017-02-07 20:08:14 +01:00
parent afb5449ca4
commit 8e870d4cc0
2 changed files with 9 additions and 3 deletions
+7 -3
View File
@@ -99,9 +99,13 @@ GLFWbool _glfwInitVulkan(int mode)
err = vkEnumerateInstanceExtensionProperties(NULL, &count, NULL);
if (err)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Vulkan: Failed to query instance extension count: %s",
_glfwGetVulkanResultString(err));
// NOTE: This happens on systems with a loader but without any Vulkan ICD
if (mode == _GLFW_REQUIRE_LOADER)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Vulkan: Failed to query instance extension count: %s",
_glfwGetVulkanResultString(err));
}
_glfwTerminateVulkan();
return GLFW_FALSE;