Merge vk-gl-cts/vulkan-cts-1.3.2 into vk-gl-cts/vulkan-cts-1.3.3
authorMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 15 Sep 2022 20:34:38 +0000 (13:34 -0700)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 16 Sep 2022 14:14:32 +0000 (07:14 -0700)
Change-Id: Ib2d8b8d33b980e04dc91b99178695dd532ccc382

1  2 
external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp
external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp

@@@ -202,19 -191,28 +203,35 @@@ void BaseAllocateTestInstance::createTe
                VK_FALSE                                                                                                                // VkBool32                                                     protectedMemory;
        };
  
 -
++#ifndef CTS_USES_VULKANSC
+       VkPhysicalDeviceCoherentMemoryFeaturesAMD coherentMemoryFeatures =
+       {
+               VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD, // VkStructureType                                      sType
+               &protectedMemoryFeature,                                                                                // const void*                                          pNext
+               VK_FALSE                                                        // VkBool32                                             deviceCoherentMemory;
+       };
++#endif // CTS_USES_VULKANSC
        VkPhysicalDeviceFeatures                                features;
        deMemset(&features, 0, sizeof(vk::VkPhysicalDeviceFeatures));
  
        VkPhysicalDeviceFeatures2                               features2               =
        {
                VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,                           // VkStructureType                                      sType
++#ifndef CTS_USES_VULKANSC
+               &coherentMemoryFeatures,                                                                        // const void*                                          pNext
++#else
 +              &protectedMemoryFeature,                                                                        // const void*                                          pNext
++#endif // CTS_USES_VULKANSC
                features                                                                                                        // VkPhysicalDeviceFeatures                     features
        };
  
        // Check if the physical device supports the protected memory feature
 -      instanceDriver.getPhysicalDeviceFeatures2(m_context.getPhysicalDevice(), &features2);
 +      instanceDriver.getPhysicalDeviceFeatures2(physicalDevice, &features2);
-       protMemSupported = protectedMemoryFeature.protectedMemory;
+       protMemSupported                        = protectedMemoryFeature.protectedMemory;
++#ifndef CTS_USES_VULKANSC
+       deviceCoherentMemSupported      = coherentMemoryFeatures.deviceCoherentMemory;
++#endif // CTS_USES_VULKANSC
  
        VkDeviceQueueCreateFlags queueCreateFlags = protMemSupported ? (vk::VkDeviceQueueCreateFlags)vk::VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT : 0u;
  
                DE_NULL,                                                                                                                // const char* const*                           ppEnabledLayerNames;
                deUint32(deviceExtensions.size()),                                                              // uint32_t                                                     enabledExtensionCount;
                (deviceExtensions.empty()) ? DE_NULL : deviceExtensions.data(), // const char* const*                           ppEnabledExtensionNames;
-               (protMemSupported || usePageable) ? DE_NULL : &deviceFeatures   // const VkPhysicalDeviceFeatures*      pEnabledFeatures;
+               (protMemSupported || usePageable || deviceCoherentMemSupported) ? DE_NULL : &deviceFeatures     // const VkPhysicalDeviceFeatures*      pEnabledFeatures;
        };
  
 -      m_logicalDevice         = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), instance, instanceDriver, m_context.getPhysicalDevice(), &deviceInfo);
 +      m_logicalDevice         = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), m_deviceGroupInstance, instanceDriver, physicalDevice, &deviceInfo);
 +#ifndef CTS_USES_VULKANSC
 +      m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), m_deviceGroupInstance, *m_logicalDevice));
 +#else
 +      m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), m_deviceGroupInstance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
 +#endif // CTS_USES_VULKANSC
  }
  
  void BaseAllocateTestInstance::createDeviceGroup (void)