vulkaninfo: Add more descriptive error message
authorJeremy Kniager <jeremyk@lunarg.com>
Wed, 26 Jun 2019 16:55:29 +0000 (10:55 -0600)
committerjeremyk-lunarg <jeremyk@lunarg.com>
Wed, 26 Jun 2019 21:11:53 +0000 (15:11 -0600)
Issue #207 mentions that one of the main problems users
encounter when troubleshooting is a failure to create a
Vulkan instance, and suggests that a statement be added
to this error message that describes the most common
causes of this problem.

This commit adds this additional statement to the current
error message.

Change-Id: I2fccf00a8d9895a602fad40913f2380fc1c0a862

vulkaninfo/vulkaninfo.c

index 99e4dbe..0da527f 100644 (file)
@@ -917,6 +917,9 @@ static void AppCreateInstance(struct AppInstance *inst) {
     VkResult err = vkCreateInstance(&inst_info, NULL, &inst->instance);
     if (err == VK_ERROR_INCOMPATIBLE_DRIVER) {
         fprintf(stderr, "Cannot create Vulkan instance.\n");
+        fprintf(stderr,
+                "This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does "
+                "not support Vulkan.\n");
         ERR_EXIT(err);
     } else if (err) {
         ERR_EXIT(err);