Temporarily disable 2 unratified Khronos extensions.

Test: Ran the following CTS test cases, which now say "NotSupported":
dEQP-VK.wsi.android.surface.query_capabilities2
dEQP-VK.wsi.android.surface.query_formats2
dEQP-VK.wsi.android.shared_presentable_image.scale_none.demand
dEQP-VK.wsi.android.shared_presentable_image.scale_none.continuous
dEQP-VK.wsi.android.shared_presentable_image.scale_up.demand
dEQP-VK.wsi.android.shared_presentable_image.scale_up.continuous
dEQP-VK.wsi.android.shared_presentable_image.scale_down.demand
dEQP-VK.wsi.android.shared_presentable_image.scale_down.continuous

Disable the Khronos/Vulkan VK_KHR_get_surface_capabilities2 and
VK_KHR_shared_presentable_image extensions until the May 5th
ratification of these two extensions.  A macro/ifdef's are used to allow
easy enablement of the extensions for internal testing and bug fixes.

V2: convert preprocessor flag to constant [chrisforbes]

Change-Id: Ic41360e42561a822d51e1d7fc3172c76c12e5bde
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index dbb217d..5fbf5f5 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -34,6 +34,9 @@
 #include "driver.h"
 #include "stubhal.h"
 
+// Set to true to enable exposing unratified extensions for development
+static const bool kEnableUnratifiedExtensions = false;
+
 // #define ENABLE_ALLOC_CALLSTACKS 1
 #if ENABLE_ALLOC_CALLSTACKS
 #include <utils/CallStack.h>
@@ -675,16 +678,24 @@
     const char* pLayerName,
     uint32_t* pPropertyCount,
     VkExtensionProperties* pProperties) {
-    static const std::array<VkExtensionProperties, 4> loader_extensions = {{
-        // WSI extensions
-        {VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_SURFACE_SPEC_VERSION},
-        {VK_KHR_ANDROID_SURFACE_EXTENSION_NAME,
-         VK_KHR_ANDROID_SURFACE_SPEC_VERSION},
-        {VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
-         VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION},
-        {VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME,
-         VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION},
-    }};
+
+    android::Vector<VkExtensionProperties> loader_extensions;
+    loader_extensions.push_back({
+        VK_KHR_SURFACE_EXTENSION_NAME,
+        VK_KHR_SURFACE_SPEC_VERSION});
+    loader_extensions.push_back({
+        VK_KHR_ANDROID_SURFACE_EXTENSION_NAME,
+        VK_KHR_ANDROID_SURFACE_SPEC_VERSION});
+    loader_extensions.push_back({
+        VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
+        VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION});
+
+    if (kEnableUnratifiedExtensions) {
+        loader_extensions.push_back({
+            VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME,
+            VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION});
+    }
+
     static const VkExtensionProperties loader_debug_report_extension = {
         VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION,
     };
@@ -782,13 +793,15 @@
         VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME,
         VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION});
 
-    // conditionally add shared_presentable_image if supportable
-    VkPhysicalDevicePresentationPropertiesANDROID presentation_properties;
-    if (QueryPresentationProperties(physicalDevice, &presentation_properties) &&
-        presentation_properties.sharedImage) {
-        loader_extensions.push_back({
-            VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME,
-            VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION});
+    if (kEnableUnratifiedExtensions) {
+        // conditionally add shared_presentable_image if supportable
+        VkPhysicalDevicePresentationPropertiesANDROID presentation_properties;
+        if (QueryPresentationProperties(physicalDevice, &presentation_properties) &&
+            presentation_properties.sharedImage) {
+            loader_extensions.push_back({
+                VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME,
+                        VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION});
+        }
     }
 
     // enumerate our extensions first