Vulkan: discover Vulkan instance versions higher than 1.2

Previously we would only discover 1.0 or 1.1, meaning that extensions
promoted to core in 1.2 wouldn't be properly discovered.

Bug: chromium:1269882
Change-Id: I38bc211a3358158ba5eccd6b361e4b1173e047fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70640
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/vulkan/BackendVk.cpp b/src/dawn_native/vulkan/BackendVk.cpp
index c9bcdcc..484c246 100644
--- a/src/dawn_native/vulkan/BackendVk.cpp
+++ b/src/dawn_native/vulkan/BackendVk.cpp
@@ -264,7 +264,7 @@
         // if the instance only supports Vulkan 1.0. Otherwise we set apiVersion to Vulkan 1.2,
         // treat 1.2 as the highest API version dawn targets.
         if (mGlobalInfo.apiVersion == VK_MAKE_VERSION(1, 0, 0)) {
-            appInfo.apiVersion = mGlobalInfo.apiVersion;
+            appInfo.apiVersion = VK_MAKE_VERSION(1, 0, 0);
         } else {
             appInfo.apiVersion = VK_MAKE_VERSION(1, 2, 0);
         }
diff --git a/src/dawn_native/vulkan/VulkanInfo.cpp b/src/dawn_native/vulkan/VulkanInfo.cpp
index 9ca7634..f5cbb4a 100644
--- a/src/dawn_native/vulkan/VulkanInfo.cpp
+++ b/src/dawn_native/vulkan/VulkanInfo.cpp
@@ -67,15 +67,11 @@
 
         // Gather info on available API version
         {
-            uint32_t supportedAPIVersion = VK_MAKE_VERSION(1, 0, 0);
-            if (vkFunctions.EnumerateInstanceVersion) {
-                vkFunctions.EnumerateInstanceVersion(&supportedAPIVersion);
+            info.apiVersion = VK_MAKE_VERSION(1, 0, 0);
+            if (vkFunctions.EnumerateInstanceVersion != nullptr) {
+                DAWN_TRY(CheckVkSuccess(vkFunctions.EnumerateInstanceVersion(&info.apiVersion),
+                                        "vkEnumerateInstanceVersion"));
             }
-
-            // Use Vulkan 1.1 if it's available.
-            info.apiVersion = (supportedAPIVersion >= VK_MAKE_VERSION(1, 1, 0))
-                                  ? VK_MAKE_VERSION(1, 1, 0)
-                                  : VK_MAKE_VERSION(1, 0, 0);
         }
 
         // Gather the info about the instance layers