misc: Remove GetDisplayInfoWSI()

This entry point was a challenge for loader to handle correctly. Since it is
going away in the new WSI proposal remove it in all components.
diff --git a/demos/cube.c b/demos/cube.c
index 8e585b7..8ddeb19 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -295,9 +295,6 @@
     int width, height;
     VkFormat format;
 
-    VkDisplayPropertiesWSI *display_props;
-    int num_displays;
-    PFN_vkGetDisplayInfoWSI fpGetDisplayInfoWSI;
     PFN_vkCreateSwapChainWSI fpCreateSwapChainWSI;
     PFN_vkDestroySwapChainWSI fpDestroySwapChainWSI;
     PFN_vkGetSwapChainInfoWSI fpGetSwapChainInfoWSI;
@@ -1917,10 +1914,6 @@
     err = vkCreateDevice(demo->gpu, &device, &demo->device);
     assert(!err);
 
-    demo->fpGetDisplayInfoWSI = vkGetDeviceProcAddr(demo->device, "vkGetDisplayInfoWSI");
-    if (demo->fpGetDisplayInfoWSI == NULL)
-        ERR_EXIT("vkGetDeviceProcAddr failed to find vkGetDisplayInfoWSI",
-                                 "vkGetDeviceProcAddr Failure");
     demo->fpCreateSwapChainWSI = vkGetDeviceProcAddr(demo->device, "vkCreateSwapChainWSI");
     if (demo->fpCreateSwapChainWSI == NULL)
         ERR_EXIT("vkGetDeviceProcAddr failed to find vkCreateSwapChainWSI",
@@ -1972,38 +1965,9 @@
             0, &demo->queue);
     assert(!err);
 
+    // for now hardcode format till get WSI support
+    demo->format = VK_FORMAT_B8G8R8A8_UNORM;
 
-    // Get the VkDisplayWSI's associated with this physical device:
-    VkDisplayWSI display;
-    err = vkGetPhysicalDeviceInfo(demo->gpu, VK_PHYSICAL_DEVICE_INFO_TYPE_DISPLAY_PROPERTIES_WSI,
-                                  &data_size, NULL);
-    if (err != VK_SUCCESS) {
-        printf("The Vulkan installable client driver (ICD) does not support "
-               "querying\nfor the swap-chain image format.  Therefore, am "
-               "hardcoding this\nformat to  VK_FORMAT_B8G8R8A8_UNORM.\n");
-        fflush(stdout);
-        demo->format = VK_FORMAT_B8G8R8A8_UNORM;
-        return;
-    }
-    demo->display_props = (VkDisplayPropertiesWSI *) malloc(data_size);
-    err = vkGetPhysicalDeviceInfo(demo->gpu, VK_PHYSICAL_DEVICE_INFO_TYPE_DISPLAY_PROPERTIES_WSI,
-                                  &data_size, demo->display_props);
-    assert(!err);
-    demo->num_displays = data_size / sizeof(VkDisplayPropertiesWSI);
-    // For now, simply use the first display (TODO: Enhance this for the
-    // future):
-    display = demo->display_props[0].display;
-
-    // Get a VkFormat to use with the VkDisplayWSI we are using:
-    err = demo->fpGetDisplayInfoWSI(display, VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI,
-                              &data_size, NULL);
-    VkDisplayFormatPropertiesWSI* display_format_props =
-        (VkDisplayFormatPropertiesWSI*) malloc(data_size);
-    err = demo->fpGetDisplayInfoWSI(display, VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI,
-                              &data_size, display_format_props);
-    // For now, simply use the first VkFormat (TODO: Enhance this for the
-    // future):
-    demo->format = display_format_props[0].swapChainFormat;
 }
 
 static void demo_init_connection(struct demo *demo)
diff --git a/demos/tri.c b/demos/tri.c
index 9814ce5..35db14d 100644
--- a/demos/tri.c
+++ b/demos/tri.c
@@ -117,9 +117,6 @@
     int width, height;
     VkFormat format;
 
-    VkDisplayPropertiesWSI *display_props;
-    int num_displays;
-    PFN_vkGetDisplayInfoWSI fpGetDisplayInfoWSI;
     PFN_vkCreateSwapChainWSI fpCreateSwapChainWSI;
     PFN_vkDestroySwapChainWSI fpDestroySwapChainWSI;
     PFN_vkGetSwapChainInfoWSI fpGetSwapChainInfoWSI;
@@ -1433,10 +1430,6 @@
                  "vkCreateInstance Failure");
     }
 
-    demo->fpGetDisplayInfoWSI = vkGetInstanceProcAddr(demo->inst, "vkGetDisplayInfoWSI");
-    if (demo->fpGetDisplayInfoWSI == NULL)
-        ERR_EXIT("vkGetInstanceProcAddr failed to find vkGetDisplayInfoWSI",
-                                 "vkGetInstanceProcAddr Failure");
     demo->fpCreateSwapChainWSI = vkGetInstanceProcAddr(demo->inst, "vkCreateSwapChainWSI");
     if (demo->fpCreateSwapChainWSI == NULL)
         ERR_EXIT("vkGetInstanceProcAddr failed to find vkCreateSwapChainWSI",
@@ -1492,38 +1485,9 @@
             0, &demo->queue);
     assert(!err);
 
+    // for now hardcode format till get WSI support
+    demo->format = VK_FORMAT_B8G8R8A8_UNORM;
 
-    // Get the VkDisplayWSI's associated with this physical device:
-    VkDisplayWSI display;
-    err = vkGetPhysicalDeviceInfo(demo->gpu, VK_PHYSICAL_DEVICE_INFO_TYPE_DISPLAY_PROPERTIES_WSI,
-                                  &data_size, NULL);
-    if (err != VK_SUCCESS) {
-        printf("The Vulkan installable client driver (ICD) does not support "
-               "querying\nfor the swap-chain image format.  Therefore, am "
-               "hardcoding this\nformat to  VK_FORMAT_B8G8R8A8_UNORM.\n");
-        fflush(stdout);
-        demo->format = VK_FORMAT_B8G8R8A8_UNORM;
-        return;
-    }
-    demo->display_props = (VkDisplayPropertiesWSI *) malloc(data_size);
-    err = vkGetPhysicalDeviceInfo(demo->gpu, VK_PHYSICAL_DEVICE_INFO_TYPE_DISPLAY_PROPERTIES_WSI,
-                                  &data_size, demo->display_props);
-    assert(!err);
-    demo->num_displays = data_size / sizeof(VkDisplayPropertiesWSI);
-    // For now, simply use the first display (TODO: Enhance this for the
-    // future):
-    display = demo->display_props[0].display;
-
-    // Get a VkFormat to use with the VkDisplayWSI we are using:
-    err = demo->fpGetDisplayInfoWSI(display, VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI,
-                              &data_size, NULL);
-    VkDisplayFormatPropertiesWSI* display_format_props =
-        (VkDisplayFormatPropertiesWSI*) malloc(data_size);
-    err = demo->fpGetDisplayInfoWSI(display, VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI,
-                              &data_size, display_format_props);
-    // For now, simply use the first VkFormat (TODO: Enhance this for the
-    // future):
-    demo->format = display_format_props[0].swapChainFormat;
 }
 
 static void demo_init_connection(struct demo *demo)
diff --git a/icd/intel/wsi_x11.c b/icd/intel/wsi_x11.c
index fc23f5c..4789b14 100644
--- a/icd/intel/wsi_x11.c
+++ b/icd/intel/wsi_x11.c
@@ -896,6 +896,7 @@
     return x11_swap_chain_wait(data->swap_chain, data->serial, timeout_ns);
 }
 
+#if 0
 ICD_EXPORT VkResult VKAPI vkGetDisplayInfoWSI(
     VkDisplayWSI                            display,
     VkDisplayInfoTypeWSI                    infoType,
@@ -934,6 +935,7 @@
 
     return ret;
 }
+#endif
 
 ICD_EXPORT VkResult VKAPI vkCreateSwapChainWSI(
     VkDevice                                device,
diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c
index ff0a901..651b367 100644
--- a/icd/nulldrv/nulldrv.c
+++ b/icd/nulldrv/nulldrv.c
@@ -849,6 +849,7 @@
     VK_FORMAT_B8G8R8A8_UNORM,
 };
 
+#if 0
 ICD_EXPORT VkResult VKAPI vkGetDisplayInfoWSI(
     VkDisplayWSI                            display,
     VkDisplayInfoTypeWSI                    infoType,
@@ -889,6 +890,7 @@
 
     return ret;
 }
+#endif
 
 ICD_EXPORT VkResult VKAPI vkCreateSwapChainWSI(
     VkDevice                                device,
diff --git a/include/vkLayer.h b/include/vkLayer.h
index bdbb8e9..6dcf104 100644
--- a/include/vkLayer.h
+++ b/include/vkLayer.h
@@ -151,7 +151,6 @@
     /* PFN_vkGetGlobalExtensionInfo GetGlobalExtensionInfo; non-dispatchable */
     PFN_vkGetPhysicalDeviceExtensionInfo GetPhysicalDeviceExtensionInfo;
     PFN_vkGetMultiDeviceCompatibility GetMultiDeviceCompatibility;
-    PFN_vkGetDisplayInfoWSI GetDisplayInfoWSI;
     PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
     PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
     PFN_vkDbgStringCallback DbgStringCallback;
diff --git a/include/vk_wsi_lunarg.h b/include/vk_wsi_lunarg.h
index 3507cfe..4028862 100644
--- a/include/vk_wsi_lunarg.h
+++ b/include/vk_wsi_lunarg.h
@@ -67,13 +67,6 @@
 // ------------------------------------------------------------------------------------------------
 // Enumerations
 
-typedef enum VkDisplayInfoTypeWSI_
-{
-    // Info type for vkGetDisplayInfo()
-    VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI              = 0x00000003,   // Return the VkFormat(s) supported for swap chains with the display
-
-    VK_ENUM_RANGE(DISPLAY_INFO_TYPE, FORMAT_PROPERTIES_WSI, FORMAT_PROPERTIES_WSI)
-} VkDisplayInfoTypeWSI;
 
 typedef enum VkSwapChainInfoTypeWSI_
 {
@@ -154,7 +147,6 @@
 // ------------------------------------------------------------------------------------------------
 // Function types
 
-typedef VkResult (VKAPI *PFN_vkGetDisplayInfoWSI)(VkDisplayWSI display, VkDisplayInfoTypeWSI infoType, size_t* pDataSize, void* pData);
 typedef VkResult (VKAPI *PFN_vkCreateSwapChainWSI)(VkDevice device, const VkSwapChainCreateInfoWSI* pCreateInfo, VkSwapChainWSI* pSwapChain);
 typedef VkResult (VKAPI *PFN_vkDestroySwapChainWSI)(VkSwapChainWSI swapChain);
 typedef VkResult (VKAPI *PFN_vkGetSwapChainInfoWSI)(VkSwapChainWSI swapChain, VkSwapChainInfoTypeWSI infoType, size_t* pDataSize, void* pData);
@@ -165,11 +157,6 @@
 
 #ifdef VK_PROTOTYPES
 
-VkResult VKAPI vkGetDisplayInfoWSI(
-    VkDisplayWSI                            display,
-    VkDisplayInfoTypeWSI                    infoType,
-    size_t*                                 pDataSize,
-    void*                                   pData);
 
 VkResult VKAPI vkCreateSwapChainWSI(
     VkDevice                                device,
diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp
index eeea84b..670b31f 100644
--- a/layers/param_checker.cpp
+++ b/layers/param_checker.cpp
@@ -1923,12 +1923,6 @@
     debug_marker_dispatch_table(device)->DbgSetObjectName(device, objType, object, nameSize, pName);
 }
 
-VK_LAYER_EXPORT VkResult VKAPI vkGetDisplayInfoWSI(VkDisplayWSI display, VkDisplayInfoTypeWSI infoType, size_t* pDataSize, void* pData)
-{
-    VkResult result = instance_dispatch_table(display)->GetDisplayInfoWSI(display, infoType, pDataSize, pData);
-    return result;
-}
-
 VK_LAYER_EXPORT VkResult VKAPI vkCreateSwapChainWSI(VkDevice device, const VkSwapChainCreateInfoWSI* pCreateInfo, VkSwapChainWSI* pSwapChain)
 {
     VkResult result = device_dispatch_table(device)->CreateSwapChainWSI(device, pCreateInfo, pSwapChain);
@@ -2151,8 +2145,6 @@
         return (void*) vkCmdBeginRenderPass;
     if (!strcmp(name, "CmdEndRenderPass"))
         return (void*) vkCmdEndRenderPass;
-    if (!strcmp(name, "GetDisplayInfoWSI"))
-        return (void*) vkGetDisplayInfoWSI;
     if (!strcmp(name, "CreateSwapChainWSI"))
         return (void*) vkCreateSwapChainWSI;
     if (!strcmp(name, "DestroySwapChainWSI"))
diff --git a/loader/loader.c b/loader/loader.c
index 3f13cdb..d5f8f46 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -91,7 +91,6 @@
     .CreateDevice = loader_CreateDevice,
     .GetPhysicalDeviceExtensionInfo = loader_GetPhysicalDeviceExtensionInfo,
     .GetMultiDeviceCompatibility = loader_GetMultiDeviceCompatibility,
-    .GetDisplayInfoWSI = loader_GetDisplayInfoWSI,
     .DbgCreateMsgCallback = loader_DbgCreateMsgCallback,
     .DbgDestroyMsgCallback = loader_DbgDestroyMsgCallback,
 };
@@ -724,7 +723,6 @@
     LOOKUP(CreateDevice);
     LOOKUP(GetPhysicalDeviceExtensionInfo);
     LOOKUP(GetMultiDeviceCompatibility);
-    LOOKUP(GetDisplayInfoWSI);
     LOOKUP(DbgCreateMsgCallback);
     LOOKUP(DbgDestroyMsgCallback);
 #undef LOOKUP
diff --git a/loader/loader.h b/loader/loader.h
index 19d9de5..d375ebc 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -120,7 +120,6 @@
     PFN_vkCreateDevice CreateDevice;
     PFN_vkGetPhysicalDeviceExtensionInfo GetPhysicalDeviceExtensionInfo;
     PFN_vkGetMultiDeviceCompatibility GetMultiDeviceCompatibility;
-    PFN_vkGetDisplayInfoWSI GetDisplayInfoWSI;
     PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
     PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
     /*
diff --git a/loader/table_ops.h b/loader/table_ops.h
index a2c67c3..45f411e 100644
--- a/loader/table_ops.h
+++ b/loader/table_ops.h
@@ -376,7 +376,6 @@
     table->CreateDevice = (PFN_vkCreateDevice) gpa(inst, "vkCreateDevice");
     table->GetPhysicalDeviceExtensionInfo = (PFN_vkGetPhysicalDeviceExtensionInfo) gpa(inst, "vkGetPhysicalDeviceExtensionInfo");
     table->GetMultiDeviceCompatibility = (PFN_vkGetMultiDeviceCompatibility) gpa(inst, "vkGetMultiDeviceCompatibility");
-    table->GetDisplayInfoWSI = (PFN_vkGetDisplayInfoWSI) gpa(inst, "vkGetDisplayInfoWSI");
 }
 
 static inline void loader_init_instance_extension_dispatch_table(
@@ -412,8 +411,6 @@
         return (void *) table->GetPhysicalDeviceExtensionInfo;
     if (!strcmp(name, "GetMultiDeviceCompatibility"))
         return (void *) table->GetMultiDeviceCompatibility;
-    if (!strcmp(name, "GetDisplayInfoWSI"))
-        return (void *) table->GetDisplayInfoWSI;
     if (!strcmp(name, "DbgCreateMsgCallback"))
         return (void *) table->DbgCreateMsgCallback;
     if (!strcmp(name, "DbgDestroyMsgCallback"))
diff --git a/loader/wsi_lunarg.c b/loader/wsi_lunarg.c
index f4b62da..0269f27 100644
--- a/loader/wsi_lunarg.c
+++ b/loader/wsi_lunarg.c
@@ -33,22 +33,7 @@
 
 /************  Trampoline entrypoints *******************/
 /* since one entrypoint is instance level will make available all entrypoints */
-VkResult VKAPI wsi_lunarg_GetDisplayInfoWSI(
-        VkDisplayWSI                            display,
-        VkDisplayInfoTypeWSI                    infoType,
-        size_t*                                 pDataSize,
-        void*                                   pData)
-{
-    const VkLayerInstanceDispatchTable *disp;
-    VkResult res;
-
-    disp = loader_get_instance_dispatch(display);
-
-    loader_platform_thread_lock_mutex(&loader_lock);
-    res = disp->GetDisplayInfoWSI(display, infoType, pDataSize, pData);
-    loader_platform_thread_unlock_mutex(&loader_lock);
-    return res;
-}
+/* TODO make this a device extension with NO trampoline code */
 
 VkResult wsi_lunarg_CreateSwapChainWSI(
         VkDevice                                device,
@@ -102,31 +87,6 @@
     return disp->QueuePresentWSI(queue, pPresentInfo);
 }
 
-/************  loader instance chain termination entrypoints ***************/
-VkResult loader_GetDisplayInfoWSI(
-        VkDisplayWSI                            display,
-        VkDisplayInfoTypeWSI                    infoType,
-        size_t*                                 pDataSize,
-        void*                                   pData)
-{
-    /* TODO: need another way to find the icd, display is not a gpu object */
-//    uint32_t gpu_index;
-//    struct loader_icd *icd = loader_get_icd((VkPhysicalDevice) display, &gpu_index); //TODO fix dispaly -> PhysDev
-    VkResult res = VK_ERROR_INITIALIZATION_FAILED;
-
-    for (struct loader_instance *inst = loader.instances; inst; inst = inst->next) {
-        for (struct loader_icd *icd = inst->icds; icd; icd = icd->next) {
-            for (uint32_t i = 0; i < icd->gpu_count; i++) {
-                if (icd->GetDisplayInfoWSI)
-                    res = icd->GetDisplayInfoWSI(display, infoType, pDataSize, pData);
-            }
-        }
-    }
-
-    return res;
-}
-
-
 /************ extension enablement ***************/
 #define WSI_LUNARG_EXT_ARRAY_SIZE 1
 static const struct loader_extension_property wsi_lunarg_extension_info = {
@@ -160,9 +120,7 @@
     if (instance == VK_NULL_HANDLE)
         return NULL;
 
-    /* since two of these entrypoints must be loader handled will report all */
-    if (!strcmp(pName, "vkGetDisplayInfoWSI"))
-        return (void*) wsi_lunarg_GetDisplayInfoWSI;
+    /* since one of these entrypoints must be loader handled will report all */
     if (!strcmp(pName, "vkCreateSwapChainWSI"))
         return (void*) wsi_lunarg_CreateSwapChainWSI;
     if (!strcmp(pName, "vkDestroySwapChainWSI"))
diff --git a/loader/wsi_lunarg.h b/loader/wsi_lunarg.h
index da022c3..6a79c49 100644
--- a/loader/wsi_lunarg.h
+++ b/loader/wsi_lunarg.h
@@ -28,12 +28,6 @@
 
 #include "vk_wsi_lunarg.h"
 
-VkResult loader_GetDisplayInfoWSI(
-        VkDisplayWSI                            display,
-        VkDisplayInfoTypeWSI                    infoType,
-        size_t*                                 pDataSize,
-        void*                                   pData);
-
 void wsi_lunarg_add_instance_extensions(
         struct loader_extension_list *ext_list);
 
diff --git a/vk-generate.py b/vk-generate.py
index a0165c7..6f136b7 100755
--- a/vk-generate.py
+++ b/vk-generate.py
@@ -121,7 +121,7 @@
             stmts.append("// GPA has to be first entry inited and uses wrapped object since it triggers init")
             stmts.append("table->GetDeviceProcAddr =(PFN_vkGetDeviceProcAddr)  gpa(device,\"vkGetDeviceProcAddr\");")
             for proto in self.protos:
-                if proto.name == "CreateInstance" or proto.name == "GetGlobalExtensionInfo" or proto.name == "GetDisplayInfoWSI" or proto.params[0].ty == "VkInstance" or proto.params[0].ty == "VkPhysicalDevice":
+                if proto.name == "CreateInstance" or proto.name == "GetGlobalExtensionInfo" or proto.params[0].ty == "VkInstance" or proto.params[0].ty == "VkPhysicalDevice":
                     continue
                 if proto.name != "GetDeviceProcAddr":
                     stmts.append("table->%s = (PFN_vk%s) gpa(baseDevice, \"vk%s\");" %
@@ -138,7 +138,7 @@
             stmts.append("// GPA has to be first entry inited and uses wrapped object since it triggers init")
             stmts.append("table->GetInstanceProcAddr =(PFN_vkGetInstanceProcAddr)  gpa(instance,\"vkGetInstanceProcAddr\");")
             for proto in self.protos:
-                if proto.name != "CreateInstance"  and proto.name != "GetDisplayInfoWSI" and proto.params[0].ty != "VkInstance" and proto.params[0].ty != "VkPhysicalDevice":
+                if proto.name != "CreateInstance"  and proto.params[0].ty != "VkInstance" and proto.params[0].ty != "VkPhysicalDevice":
                     continue
                 if proto.name != "GetInstanceProcAddr":
                     stmts.append("table->%s = (PFN_vk%s) gpa(baseInstance, \"vk%s\");" %
diff --git a/vk-layer-generate.py b/vk-layer-generate.py
index 2f3d576..d4b70d7 100755
--- a/vk-layer-generate.py
+++ b/vk-layer-generate.py
@@ -33,7 +33,7 @@
 import vk_helper
 
 def proto_is_global(proto):
-    if proto.params[0].ty == "VkInstance" or proto.params[0].ty == "VkPhysicalDevice" or proto.name == "CreateInstance" or proto.name == "GetGlobalExtensionInfo" or proto.name == "GetPhysicalDeviceExtensionInfo" or proto.name == "GetDisplayInfoWSI":
+    if proto.params[0].ty == "VkInstance" or proto.params[0].ty == "VkPhysicalDevice" or proto.name == "CreateInstance" or proto.name == "GetGlobalExtensionInfo" or proto.name == "GetPhysicalDeviceExtensionInfo":
        return True
     else:
        return False
diff --git a/vulkan.py b/vulkan.py
index a83aa8d..a72614f 100755
--- a/vulkan.py
+++ b/vulkan.py
@@ -867,12 +867,6 @@
         "VkDbgMsgCallback",
     ],
     protos=[
-        Proto("VkResult", "GetDisplayInfoWSI",
-            [Param("VkDisplayWSI", "display"),
-             Param("VkDisplayInfoTypeWSI", "infoType"),
-             Param("size_t*", "pDataSize"),
-             Param("void*", "pData")]),
-
         Proto("VkResult", "CreateSwapChainWSI",
             [Param("VkDevice", "device"),
              Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),