Merge vk-gl-cts/vulkan-cts-1.1.5 into vk-gl-cts/vulkan-cts-1.2.0
authorAlexander Galazin <alexander.galazin@arm.com>
Fri, 30 Aug 2019 11:48:28 +0000 (13:48 +0200)
committerAlexander Galazin <alexander.galazin@arm.com>
Fri, 30 Aug 2019 11:48:28 +0000 (13:48 +0200)
Change-Id: Ib45d4048f7ff9278ac5c376c17115e0e35984297

1  2 
external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl
external/vulkancts/modules/vulkan/image/vktImageCompressionTranscodingSupport.cpp
external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp
external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationMultiQueueTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationSingleQueueTests.cpp
external/vulkancts/scripts/gen_framework.py
external/vulkancts/scripts/src/mandatory_features.txt

@@@ -66,19 -76,11 +76,21 @@@ bool checkMandatoryFeatures(const vkt::
                nextPtr  = &physicalDeviceScalarBlockLayoutFeaturesEXT.pNext;
        }
  
-       if (vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_subgroup_size_control"))
 +      vk::VkPhysicalDeviceSubgroupSizeControlFeaturesEXT physicalDeviceSubgroupSizeControlFeaturesEXT;
-               deMemset(&physicalDeviceSubgroupSizeControlFeaturesEXT, 0, sizeof(physicalDeviceSubgroupSizeControlFeaturesEXT));
++      deMemset(&physicalDeviceSubgroupSizeControlFeaturesEXT, 0, sizeof(physicalDeviceSubgroupSizeControlFeaturesEXT));
++
++      if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_EXT_subgroup_size_control")) )
 +      {
 +              physicalDeviceSubgroupSizeControlFeaturesEXT.sType = getStructureType<VkPhysicalDeviceSubgroupSizeControlFeaturesEXT>();
 +              *nextPtr = &physicalDeviceSubgroupSizeControlFeaturesEXT;
 +              nextPtr  = &physicalDeviceSubgroupSizeControlFeaturesEXT.pNext;
 +      }
 +
        vk::VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR physicalDeviceUniformBufferStandardLayoutFeaturesKHR;
-       if (vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_uniform_buffer_standard_layout"))
+       deMemset(&physicalDeviceUniformBufferStandardLayoutFeaturesKHR, 0, sizeof(physicalDeviceUniformBufferStandardLayoutFeaturesKHR));
+       if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_KHR_uniform_buffer_standard_layout")) )
        {
-               deMemset(&physicalDeviceUniformBufferStandardLayoutFeaturesKHR, 0, sizeof(physicalDeviceUniformBufferStandardLayoutFeaturesKHR));
                physicalDeviceUniformBufferStandardLayoutFeaturesKHR.sType = getStructureType<VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR>();
                *nextPtr = &physicalDeviceUniformBufferStandardLayoutFeaturesKHR;
                nextPtr  = &physicalDeviceUniformBufferStandardLayoutFeaturesKHR.pNext;
                nextPtr  = &physicalDeviceVariablePointersFeatures.pNext;
        }
  
-       if (context.contextSupports(vk::ApiVersion(1, 2, 0)))
 +      vk::VkPhysicalDeviceVulkan11Features physicalDeviceVulkan11Features;
-               deMemset(&physicalDeviceVulkan11Features, 0, sizeof(physicalDeviceVulkan11Features));
++      deMemset(&physicalDeviceVulkan11Features, 0, sizeof(physicalDeviceVulkan11Features));
++
++      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
-       if (context.contextSupports(vk::ApiVersion(1, 2, 0)))
 +              physicalDeviceVulkan11Features.sType = getStructureType<VkPhysicalDeviceVulkan11Features>();
 +              *nextPtr = &physicalDeviceVulkan11Features;
 +              nextPtr  = &physicalDeviceVulkan11Features.pNext;
 +      }
 +
 +      vk::VkPhysicalDeviceVulkan12Features physicalDeviceVulkan12Features;
-               deMemset(&physicalDeviceVulkan12Features, 0, sizeof(physicalDeviceVulkan12Features));
++      deMemset(&physicalDeviceVulkan12Features, 0, sizeof(physicalDeviceVulkan12Features));
++
++      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              physicalDeviceVulkan12Features.sType = getStructureType<VkPhysicalDeviceVulkan12Features>();
 +              *nextPtr = &physicalDeviceVulkan12Features;
 +              nextPtr  = &physicalDeviceVulkan12Features.pNext;
 +      }
 +
        context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &coreFeatures);
        bool result = true;
  
                }
        }
  
-       if ( vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_multiview") )
++      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
++      {
++              if ( physicalDeviceVulkan11Features.multiview == VK_FALSE )
++              {
++                      log << tcu::TestLog::Message << "Mandatory feature multiview not supported" << tcu::TestLog::EndMessage;
++                      result = false;
++              }
++      }
++
+       if ( context.contextSupports(vk::ApiVersion(1, 1, 0)) )
        {
                if ( physicalDeviceMultiviewFeatures.multiview == VK_FALSE )
                {
                }
        }
  
-       if ( vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_subgroup_size_control") )
++      if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_EXT_subgroup_size_control")) )
 +      {
 +              if ( physicalDeviceSubgroupSizeControlFeaturesEXT.subgroupSizeControl == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature subgroupSizeControl not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
-       if ( vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_subgroup_size_control") )
++      if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_EXT_subgroup_size_control")) )
 +      {
 +              if ( physicalDeviceSubgroupSizeControlFeaturesEXT.computeFullSubgroups == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature computeFullSubgroups not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              if ( physicalDeviceVulkan12Features.subgroupBroadcastDynamicId == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature subgroupBroadcastDynamicId not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              if ( physicalDeviceVulkan12Features.imagelessFramebuffer == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature imagelessFramebuffer not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              if ( physicalDeviceVulkan12Features.uniformBufferStandardLayout == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature uniformBufferStandardLayout not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              if ( physicalDeviceVulkan12Features.separateDepthStencilLayouts == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature separateDepthStencilLayouts not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              if ( physicalDeviceVulkan12Features.hostQueryReset == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature hostQueryReset not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
 +      {
 +              if ( physicalDeviceVulkan12Features.timelineSemaphore == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature timelineSemaphore not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayDynamicIndexing == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature shaderUniformTexelBufferArrayDynamicIndexing not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.shaderStorageTexelBufferArrayDynamicIndexing == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature shaderStorageTexelBufferArrayDynamicIndexing not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.shaderSampledImageArrayNonUniformIndexing == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature shaderSampledImageArrayNonUniformIndexing not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.shaderStorageBufferArrayNonUniformIndexing == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature shaderStorageBufferArrayNonUniformIndexing not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature shaderUniformTexelBufferArrayNonUniformIndexing not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingSampledImageUpdateAfterBind == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingSampledImageUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingStorageImageUpdateAfterBind == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingStorageImageUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingStorageBufferUpdateAfterBind == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingStorageBufferUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingUniformTexelBufferUpdateAfterBind == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingUniformTexelBufferUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingStorageTexelBufferUpdateAfterBind == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingStorageTexelBufferUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingUpdateUnusedWhilePending == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingUpdateUnusedWhilePending not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.descriptorBindingPartiallyBound == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature descriptorBindingPartiallyBound not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
 +      if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
 +      {
 +              if ( physicalDeviceVulkan12Features.runtimeDescriptorArray == VK_FALSE )
 +              {
 +                      log << tcu::TestLog::Message << "Mandatory feature runtimeDescriptorArray not supported" << tcu::TestLog::EndMessage;
 +                      result = false;
 +              }
 +      }
 +
        return result;
  }
  
@@@ -10151,15 -10127,17 +10151,17 @@@ tcu::TestCaseGroup* createFloat16Logica
        de::MovePtr<tcu::TestCaseGroup>         testGroup                       (new tcu::TestCaseGroup(testCtx, groupName.c_str(), "Float 16 logical tests"));
  
        de::Random                                                      rnd                                     (deStringHash(testGroup->getName()));
 -      const string                                            spvCapabilities         = string("OpCapability StorageUniformBufferBlock16\n") + (nanSupported ? "OpCapability SignedZeroInfNanPreserve\n" : "");
 +      const string                                            spvCapabilities         = string("OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n") + (nanSupported ? "OpCapability SignedZeroInfNanPreserve\n" : "");
        const string                                            spvExtensions           = string("OpExtension \"SPV_KHR_16bit_storage\"\n") + (nanSupported ? "OpExtension \"SPV_KHR_float_controls\"\n" : "");
        const string                                            spvExecutionMode        = nanSupported ? "OpExecutionMode %BP_main SignedZeroInfNanPreserve 16\n" : "";
-       const deUint32                                          numDataPoints           = 16;
-       const vector<deFloat16>                         float16Data                     = getFloat16s(rnd, numDataPoints);
-       const vector<deFloat16>                         float16Data1            = squarize(float16Data, 0);
-       const vector<deFloat16>                         float16Data2            = squarize(float16Data, 1);
-       const vector<deFloat16>                         float16DataVec1         = squarizeVector(float16Data, 0);
-       const vector<deFloat16>                         float16DataVec2         = squarizeVector(float16Data, 1);
+       const deUint32                                          numDataPointsScalar     = 16;
+       const deUint32                                          numDataPointsVector     = 14;
+       const vector<deFloat16>                         float16DataScalar       = getFloat16s(rnd, numDataPointsScalar);
+       const vector<deFloat16>                         float16DataVector       = getFloat16s(rnd, numDataPointsVector);
+       const vector<deFloat16>                         float16Data1            = squarize(float16DataScalar, 0);                       // Total Size: square(sizeof(float16DataScalar))
+       const vector<deFloat16>                         float16Data2            = squarize(float16DataScalar, 1);
+       const vector<deFloat16>                         float16DataVec1         = squarizeVector(float16DataVector, 0);         // Total Size: 2 * (square(square(sizeof(float16DataVector))))
+       const vector<deFloat16>                         float16DataVec2         = squarizeVector(float16DataVector, 1);
        const vector<deFloat16>                         float16OutDummy         (float16Data1.size(), 0);
        const vector<deFloat16>                         float16OutVecDummy      (float16DataVec1.size(), 0);
  
@@@ -1636,21 -1653,30 +1644,34 @@@ def writeMandatoryFeatures(filename)
                                   '\tcoreFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;',
                                   '\tvoid** nextPtr = &coreFeatures.pNext;',
                                   ''])
        listStruct = sorted(dictStructs.items(), key=lambda tup: tup[0]) # sort to have same results for py2 and py3
        for k, v in listStruct:
 +              if (v[1].startswith("ApiVersion")):
 +                      cond = '\tif (context.contextSupports(vk::' + v[1] + '))'
 +              else:
 +                      cond = '\tif (vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "' + v[1] + '"))'
                stream.extend(['\tvk::' + k + ' ' + v[0]+ ';',
-                                       cond,
-                                       '\t{',
-                                       '\t\tdeMemset(&' + v[0] + ', 0, sizeof(' + v[0] + '));',
-                                       '\t\t' + v[0] + '.sType = getStructureType<' + k + '>();',
-                                       '\t\t*nextPtr = &' + v[0] + ';',
-                                       '\t\tnextPtr  = &' + v[0] + '.pNext;',
-                                       '\t}',
+                                       '\tdeMemset(&' + v[0] + ', 0, sizeof(' + v[0] + '));',
                                        ''])
+               reqs = v[1:]
+               if len(reqs) > 0 :
+                       cond = 'if ( '
+                       for i, req in enumerate(reqs) :
+                               if (req.startswith("ApiVersion")):
+                                       cond = cond + 'context.contextSupports(vk::' + req + ')'
+                               else:
+                                       cond = cond + 'isExtensionSupported(deviceExtensions, RequiredExtension("' + req + '"))'
+                               if i+1 < len(reqs) :
+                                       cond = cond + ' || '
+                       cond = cond + ' )'
+                       stream.append('\t' + cond)
+               stream.extend(['\t{',
+                                          '\t\t' + v[0] + '.sType = getStructureType<' + k + '>();',
+                                          '\t\t*nextPtr = &' + v[0] + ';',
+                                          '\t\tnextPtr  = &' + v[0] + '.pNext;',
+                                          '\t}',
+                                          ''])
        stream.extend(['\tcontext.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &coreFeatures);',
                                   '\tbool result = true;',
                                   ''])
@@@ -10,8 -10,8 +10,9 @@@ VkPhysicalDeviceFeatures                                                              robustB
  VkPhysicalDeviceFeatures                                                              shaderSampledImageArrayDynamicIndexing                          REQUIREMENTS ( VK_EXT_descriptor_indexing )
  VkPhysicalDeviceFeatures                                                              shaderStorageBufferArrayDynamicIndexing                         REQUIREMENTS ( VK_EXT_descriptor_indexing )
  VkPhysicalDevice8BitStorageFeaturesKHR                                        storageBuffer8BitAccess                                                         REQUIREMENTS ( VK_KHR_8bit_storage )
- VkPhysicalDeviceMultiviewFeatures                                             multiview                                                                                       REQUIREMENTS ( VK_KHR_multiview )
 +VkPhysicalDeviceVulkan11Features                                              multiview                                                                                       REQUIREMENTS ( "ApiVersion(1, 2, 0)" )
+ VkPhysicalDeviceMultiviewFeatures                                             multiview                                                                                       REQUIREMENTS ( "ApiVersion(1, 1, 0)" )
+ VkPhysicalDeviceMultiviewFeatures                                             multiview                                                                                       REQUIREMENTS ( VK_KHR_multiview )
  VkPhysicalDeviceVariablePointersFeatures                              variablePointersStorageBuffer                                           REQUIREMENTS ( VK_KHR_variable_pointers )
  VkPhysicalDeviceDescriptorIndexingFeaturesEXT                 shaderUniformTexelBufferArrayDynamicIndexing            REQUIREMENTS ( VK_EXT_descriptor_indexing )
  VkPhysicalDeviceDescriptorIndexingFeaturesEXT                 shaderStorageTexelBufferArrayDynamicIndexing            REQUIREMENTS ( VK_EXT_descriptor_indexing )