mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
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:
+7
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user