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

View File

@ -146,6 +146,8 @@ information on what to include when reporting a bug.
- [Win32] Bugfix: Undecorated windows could not be iconified by the user (#861)
- [Win32] Bugfix: Deadzone logic could underflow with some controllers (#910)
- [Win32] Bugfix: Bitness test in `FindVulkan.cmake` was VS specific (#928)
- [Win32] Bugfix: `glfwVulkanSupported` emitted an error on systems with
a loader but no ICD (#916)
- [X11] Replaced `_GLFW_HAS_XF86VM` compile-time option with dynamic loading
- [X11] Bugfix: `glfwGetVideoMode` would segfault on Cygwin/X
- [Linux] Bugfix: Event processing did not detect joystick disconnection (#932)

View File

@ -98,10 +98,14 @@ GLFWbool _glfwInitVulkan(int mode)
err = vkEnumerateInstanceExtensionProperties(NULL, &count, NULL);
if (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;