diff options
| author | Ian Elliott <ian@LunarG.com> | 2015-04-28 13:22:33 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-04-29 11:25:22 -0600 |
| commit | 6515291a9aac41da004878edfe8bd09fb01c5cd3 (patch) | |
| tree | cb365bdc23e071c3dc7a8643b9d9357f25336935 | |
| parent | 0726413b1b04a1a2a83c5f4c490b8277be4b0bc0 (diff) | |
| download | usermoji-6515291a9aac41da004878edfe8bd09fb01c5cd3.tar.xz | |
demos: tri/cube give error if can't find WSI extension.
| -rw-r--r-- | demos/cube.c | 15 | ||||
| -rw-r--r-- | demos/tri.c | 15 |
2 files changed, 22 insertions, 8 deletions
diff --git a/demos/cube.c b/demos/cube.c index b126a7a0..b451bbf1 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1844,7 +1844,14 @@ static void demo_init_vk(struct demo *demo) if (!strcmp(ext_names[0], extProp.extName)) extFound = 1; } - assert(extFound); + if (!extFound) { + ERR_EXIT("vkGetGlobalExtensionInfo failed to find the " + "\"VK_WSI_LunarG\" extension.\n\nDo you have a compatible " + "Vulkan installable client driver (ICD) installed?\nPlease " + "look at the Getting Started guide for additional " + "information.\n", + "vkCreateInstance Failure"); + } const VkApplicationInfo app = { .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pNext = NULL, @@ -1884,12 +1891,12 @@ static void demo_init_vk(struct demo *demo) err = vkCreateInstance(&inst_info, &demo->inst); if (err == VK_ERROR_INCOMPATIBLE_DRIVER) { ERR_EXIT("Cannot find a compatible Vulkan installable client driver " - "(ICD).\nPlease look at the Getting Started guide for " + "(ICD).\n\nPlease look at the Getting Started guide for " "additional information.\n", "vkCreateInstance Failure"); } else if (err) { - ERR_EXIT("vkCreateInstance failed. Do you have a compatible Vulkan " - "installable client driver (ICD) installed. Please look at " + ERR_EXIT("vkCreateInstance failed.\n\nDo you have a compatible Vulkan " + "installable client driver (ICD) installed?\nPlease look at " "the Getting Started guide for additional information.\n", "vkCreateInstance Failure"); } diff --git a/demos/tri.c b/demos/tri.c index 00392613..9140be00 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -1390,7 +1390,14 @@ static void demo_init_vk(struct demo *demo) if (!strcmp(ext_names[0], extProp.extName)) extFound = 1; } - assert(extFound); + if (!extFound) { + ERR_EXIT("vkGetGlobalExtensionInfo failed to find the " + "\"VK_WSI_LunarG\" extension.\n\nDo you have a compatible " + "Vulkan installable client driver (ICD) installed?\nPlease " + "look at the Getting Started guide for additional " + "information.\n", + "vkCreateInstance Failure"); + } const VkApplicationInfo app = { .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pNext = NULL, @@ -1429,12 +1436,12 @@ static void demo_init_vk(struct demo *demo) err = vkCreateInstance(&inst_info, &demo->inst); if (err == VK_ERROR_INCOMPATIBLE_DRIVER) { ERR_EXIT("Cannot find a compatible Vulkan installable client driver " - "(ICD).\nPlease look at the Getting Started guide for " + "(ICD).\n\nPlease look at the Getting Started guide for " "additional information.\n", "vkCreateInstance Failure"); } else if (err) { - ERR_EXIT("vkCreateInstance failed. Do you have a compatible Vulkan " - "installable client driver (ICD) installed. Please look at " + ERR_EXIT("vkCreateInstance failed.\n\nDo you have a compatible Vulkan " + "installable client driver (ICD) installed?\nPlease look at " "the Getting Started guide for additional information.\n", "vkCreateInstance Failure"); } |
