Fix GetPhysicalDeviceSurfaceFormats2KHR for compression control struct handling

As per the spec, vkGetPhysicalDeviceImageFormatProperties2 may return
VK_ERROR_FORMAT_NOT_SUPPORTED when an invalid combination of parameters
appears in VkPhysicalDeviceImageFormatInfo2 pImageFormatInfo argument
which is not handled by the loader. i.e.. loader doesn't loop through
all surface formats

Fix this by correctly handling vkGetPhysicalDeviceImageFormatProperties2
return value

Test: Working separately on testing strategy for this: 361626599
Bug: 357903074
Flag: EXEMPT bugfix
Change-Id: Id0712387e3249ac6118990441a4bb19102cd4a84
diff --git a/vulkan/libvulkan/swapchain.cpp b/vulkan/libvulkan/swapchain.cpp
index 00e987f..ba2b888 100644
--- a/vulkan/libvulkan/swapchain.cpp
+++ b/vulkan/libvulkan/swapchain.cpp
@@ -1215,8 +1215,15 @@
                             surfaceCompressionProps
                                 ->imageCompressionFixedRateFlags =
                                 compressionProps.imageCompressionFixedRateFlags;
-                        } else {
+                        } else if (compressionRes ==
+                                       VK_ERROR_OUT_OF_HOST_MEMORY ||
+                                   compressionRes ==
+                                       VK_ERROR_OUT_OF_DEVICE_MEMORY) {
                             return compressionRes;
+                        } else {
+                            // For any of the *_NOT_SUPPORTED errors we continue
+                            // onto the next format
+                            continue;
                         }
                     }
                 } break;