Commit 8e870d4c authored by Camilla Löwy's avatar Camilla Löwy
Browse files

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.
parent afb5449c
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment