Merge vk-gl-cts/vulkan-cts-1.1.5 into vk-gl-cts/vulkan-cts-1.2.0
authorAlexander Galazin <alexander.galazin@arm.com>
Tue, 1 Oct 2019 11:21:46 +0000 (13:21 +0200)
committerAlexander Galazin <alexander.galazin@arm.com>
Tue, 1 Oct 2019 11:21:46 +0000 (13:21 +0200)
Change-Id: Iac0fcad25eac20577e603b022f59b4f87cb9055a

1  2 
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp

Simple merge
@@@ -2069,24 -2085,49 +2069,43 @@@ tcu::TestStatus testSwapchainMutable(Co
        const InstanceDriver&                   vki = instHelper.vki;
        const VkDevice                                  device = *devHelper.device;
        const VkPhysicalDevice                  physDevice = devHelper.physicalDevice;
 +      SimpleAllocator                                 allocator(vk, device, getPhysicalDeviceMemoryProperties(vki, context.getPhysicalDevice()));
  
 -      SimpleAllocator                         allocator(vk, device, getPhysicalDeviceMemoryProperties(vki, context.getPhysicalDevice()));
 -
 -      // Check required features on the format for the required upload/download methods
 -      VkFormatProperties      imageFormatProps, viewFormatProps;
 -      vki.getPhysicalDeviceFormatProperties(physDevice, caseDef.imageFormat, &imageFormatProps);
 -      vki.getPhysicalDeviceFormatProperties(physDevice, caseDef.viewFormat, &viewFormatProps);
 -
 -      const VkImageUsageFlags                         imageUsage = getImageUsageForTestCase(caseDef);
 +      const VkImageUsageFlags                 imageUsage = getImageUsageForTestCase(caseDef);
  
-       const VkSurfaceCapabilitiesKHR  capabilities = getPhysicalDeviceSurfaceCapabilities(vki,
-                                                                                                                                                                               physDevice,
-                                                                                                                                                                               *surface);
+       {
+               VkImageFormatProperties properties;
+               VkResult                                result;
+               result = vki.getPhysicalDeviceImageFormatProperties(physDevice, caseDef.imageFormat, getImageType(caseDef.imageType), VK_IMAGE_TILING_OPTIMAL, imageUsage, 0, &properties);
+               if (result == VK_ERROR_FORMAT_NOT_SUPPORTED)
+               {
+                       TCU_THROW(NotSupportedError, "Image format is not supported for required usage");
+               }
+               result = vki.getPhysicalDeviceImageFormatProperties(physDevice, caseDef.viewFormat, getImageType(caseDef.imageType), VK_IMAGE_TILING_OPTIMAL, imageUsage, 0, &properties);
+               if (result == VK_ERROR_FORMAT_NOT_SUPPORTED)
+               {
+                       TCU_THROW(NotSupportedError, "Image view format is not supported for required usage");
+               }
+       }
+       const VkSurfaceCapabilitiesKHR          capabilities = getPhysicalDeviceSurfaceCapabilities(vki,
+                                                                                                                                                                                       physDevice,
+                                                                                                                                                                                       *surface);
  
        if (caseDef.numLayers > capabilities.maxImageArrayLayers)
                caseDef.numLayers = capabilities.maxImageArrayLayers;
  
        // Check support for requested formats by swapchain surface
 -      const vector<VkSurfaceFormatKHR>        surfaceFormats = getPhysicalDeviceSurfaceFormats(vki,
 +      const vector<VkSurfaceFormatKHR>surfaceFormats = getPhysicalDeviceSurfaceFormats(vki,
-                                                                                                                                                                                physDevice,
-                                                                                                                                                                                *surface);
+                                                                                                                                                                        physDevice,
+                                                                                                                                                                        *surface);
  
 -      const VkSurfaceFormatKHR*                       surfaceFormat = DE_NULL;
 -      const VkFormat*                                         viewFormat = DE_NULL;
 +      const VkSurfaceFormatKHR*               surfaceFormat = DE_NULL;
 +      const VkFormat*                                 viewFormat = DE_NULL;
  
        for (vector<VkSurfaceFormatKHR>::size_type i = 0; i < surfaceFormats.size(); i++)
        {