Merge vk-gl-cts/vulkan-cts-1.1.5 into vk-gl-cts/master
authorAlexander Galazin <alexander.galazin@arm.com>
Tue, 1 Oct 2019 12:14:45 +0000 (14:14 +0200)
committerAlexander Galazin <alexander.galazin@arm.com>
Tue, 1 Oct 2019 12:14:45 +0000 (14:14 +0200)
Change-Id: I4e8f6bec91ab0e162e2912bd516fe7fc4ece2a43

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

Simple merge
@@@ -2854,16 -2859,16 +2854,16 @@@ void TexelViewCompatibleCase::checkSupp
        {
                VkImageFormatProperties imageFormatProperties;
  
 -              if (VK_ERROR_FORMAT_NOT_SUPPORTED == vk.getPhysicalDeviceImageFormatProperties(physicalDevice, m_parameters.formatUncompressed,
 -                                                                                              mapImageType(m_parameters.imageType), VK_IMAGE_TILING_OPTIMAL,
 -                                                                                              m_parameters.uncompressedImageUsage, 0u, &imageFormatProperties))
 +              if (vk.getPhysicalDeviceImageFormatProperties(physicalDevice, m_parameters.formatUncompressed,
 +                                                                                                        mapImageType(m_parameters.imageType), VK_IMAGE_TILING_OPTIMAL,
 +                                                                                                        m_parameters.uncompressedImageUsage, 0u, &imageFormatProperties) == VK_ERROR_FORMAT_NOT_SUPPORTED)
                        TCU_THROW(NotSupportedError, "Operation not supported with this image format");
  
-               if (vk.getPhysicalDeviceImageFormatProperties(physicalDevice, m_parameters.formatCompressed,
-                                                                                                         mapImageType(m_parameters.imageType), VK_IMAGE_TILING_OPTIMAL,
-                                                                                                         m_parameters.compressedImageUsage,
-                                                                                                         VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR,
-                                                                                                         &imageFormatProperties) == VK_ERROR_FORMAT_NOT_SUPPORTED)
+               if (VK_ERROR_FORMAT_NOT_SUPPORTED == vk.getPhysicalDeviceImageFormatProperties(physicalDevice, m_parameters.formatCompressed,
+                                                                                               mapImageType(m_parameters.imageType), VK_IMAGE_TILING_OPTIMAL,
+                                                                                               m_parameters.compressedImageUsage,
+                                                                                               VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR,
+                                                                                               &imageFormatProperties))
                        TCU_THROW(NotSupportedError, "Operation not supported with this image format");
        }
  
@@@ -2072,13 -2085,38 +2072,32 @@@ 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;