Only enable VK_KHR_maintenance1 when available.

This prevents an error in case ANGLE is run on an older Vulkan driver
that does not support the VK_KHR_maintenance1 extension.

Bug: angleproject:3035
Change-Id: I7e2b74bcb88bffdfc2a525a1d332eb3ef7d23d7c
Reviewed-on: https://chromium-review.googlesource.com/c/1387347
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 50f05cc..b14eb9e 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -795,9 +795,12 @@
     mFeatures.basicGLLineRasterization = true;
 #endif  // defined(ANGLE_PLATFORM_ANDROID)
 
-    // TODO(lucferron): Currently disabled on Intel only since many tests are failing and need
-    // investigation. http://anglebug.com/2728
-    mFeatures.flipViewportY = !IsIntel(mPhysicalDeviceProperties.vendorID);
+    if (ExtensionFound(VK_KHR_MAINTENANCE1_EXTENSION_NAME, deviceExtensionProps))
+    {
+        // TODO(lucferron): Currently disabled on Intel only since many tests are failing and need
+        // investigation. http://anglebug.com/2728
+        mFeatures.flipViewportY = !IsIntel(mPhysicalDeviceProperties.vendorID);
+    }
 
 #ifdef ANGLE_PLATFORM_WINDOWS
     // http://anglebug.com/2838