bug 15045: vkGetPhysicalDeviceImageFormatProperties for unsupported formats (WIP)

Change the return type of vkGetPhysicalDeviceImageFormatProperties.

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15045
diff --git a/loader/loader.c b/loader/loader.c
index 13dd90f..3062da0 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -2916,7 +2916,7 @@
         icd->GetPhysicalDeviceFormatProperties(phys_dev->phys_dev, format, pFormatInfo);
 }
 
-void VKAPI loader_GetPhysicalDeviceImageFormatProperties(
+VkResult VKAPI loader_GetPhysicalDeviceImageFormatProperties(
         VkPhysicalDevice                        physicalDevice,
         VkFormat                                format,
         VkImageType                             type,
@@ -2928,9 +2928,11 @@
     struct loader_physical_device *phys_dev = (struct loader_physical_device *) physicalDevice;
     struct loader_icd *icd = phys_dev->this_icd;
 
-    if (icd->GetPhysicalDeviceImageFormatProperties)
-        icd->GetPhysicalDeviceImageFormatProperties(phys_dev->phys_dev, format,
-                                type, tiling, usage, flags, pImageFormatProperties);
+    if (!icd->GetPhysicalDeviceImageFormatProperties)
+        return VK_ERROR_INITIALIZATION_FAILED;
+
+    return icd->GetPhysicalDeviceImageFormatProperties(phys_dev->phys_dev, format,
+            type, tiling, usage, flags, pImageFormatProperties);
 }
 
 void VKAPI loader_GetPhysicalDeviceSparseImageFormatProperties(
diff --git a/loader/loader.h b/loader/loader.h
index f356a79..f91e86c 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -290,7 +290,8 @@
         VkFormat                                format,
         VkFormatProperties*                     pFormatInfo);
 
-void VKAPI loader_GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice                        physicalDevice,
+VkResult VKAPI loader_GetPhysicalDeviceImageFormatProperties(
+        VkPhysicalDevice                        physicalDevice,
         VkFormat                                format,
         VkImageType                             type,
         VkImageTiling                           tiling,
diff --git a/loader/trampoline.c b/loader/trampoline.c
index 99c5279..1186b27 100644
--- a/loader/trampoline.c
+++ b/loader/trampoline.c
@@ -226,12 +226,12 @@
     disp->GetPhysicalDeviceFormatProperties(gpu, format, pFormatInfo);
 }
 
-LOADER_EXPORT void VKAPI vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties)
+LOADER_EXPORT VkResult VKAPI vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties)
 {
     const VkLayerInstanceDispatchTable *disp;
 
     disp = loader_get_instance_dispatch(physicalDevice);
-    disp->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
+    return disp->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
 }
 
 LOADER_EXPORT void VKAPI vkGetPhysicalDeviceProperties(