anv/device: Improve version error reporting
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 2 Feb 2016 21:15:18 +0000 (13:15 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 2 Feb 2016 21:16:13 +0000 (13:16 -0800)
src/vulkan/anv_device.c

index 8251467797717a9b54432fbd116b49c57e9dddce..c39c506c78f2738eac748cdfdd17ce481b80e09e 100644 (file)
@@ -217,7 +217,11 @@ VkResult anv_CreateInstance(
    uint32_t client_version = pCreateInfo->pApplicationInfo->apiVersion;
    if (VK_MAKE_VERSION(1, 0, 0) > client_version ||
        client_version > VK_MAKE_VERSION(1, 0, 2)) {
-      return vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
+      return vk_errorf(VK_ERROR_INCOMPATIBLE_DRIVER,
+                       "Client requested version %d.%d.%d",
+                       VK_VERSION_MAJOR(client_version),
+                       VK_VERSION_MINOR(client_version),
+                       VK_VERSION_PATCH(client_version));
    }
 
    for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {