Remove custom instances from robustness index access tests
authorRicardo Garcia <rgarcia@igalia.com>
Fri, 2 Dec 2022 12:16:22 +0000 (13:16 +0100)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Fri, 2 Dec 2022 15:52:05 +0000 (16:52 +0100)
They had recently been removed from other robustness tests before the
robustness index access tests were merged, and this caused build issues.

Affects:
dEQP-VK.robustness.index_access.*
dEQP-VK.info.device_mandatory_features

Components: Vulkan
VK-GL-CTS issue: 3670

Change-Id: I8f51d1fc779bac30478dc6211369e578c047d0e1

external/vulkancts/framework/vulkan/generated/vulkan/vkMandatoryFeatures.inl
external/vulkancts/modules/vulkan/robustness/vktRobustnessIndexAccessTests.cpp

index 9b4d36d..83e4af3 100644 (file)
@@ -68,7 +68,7 @@ bool checkMandatoryFeatures(const vkt::Context& context)
        vk::VkPhysicalDeviceAddressBindingReportFeaturesEXT physicalDeviceAddressBindingReportFeaturesEXT;
        deMemset(&physicalDeviceAddressBindingReportFeaturesEXT, 0, sizeof(physicalDeviceAddressBindingReportFeaturesEXT));
 
-       if ( isExtensionStructSupported(deviceExtensions, RequiredExtension("VK_EXT_device_address_binding_report")) )
+       if ( canUseFeaturesStruct(deviceExtensions, usedApiVersion, "VK_EXT_device_address_binding_report") )
        {
                physicalDeviceAddressBindingReportFeaturesEXT.sType = getStructureType<VkPhysicalDeviceAddressBindingReportFeaturesEXT>();
                *nextPtr = &physicalDeviceAddressBindingReportFeaturesEXT;
@@ -162,7 +162,7 @@ bool checkMandatoryFeatures(const vkt::Context& context)
        vk::VkPhysicalDeviceDescriptorBufferFeaturesEXT physicalDeviceDescriptorBufferFeaturesEXT;
        deMemset(&physicalDeviceDescriptorBufferFeaturesEXT, 0, sizeof(physicalDeviceDescriptorBufferFeaturesEXT));
 
-       if ( isExtensionStructSupported(deviceExtensions, RequiredExtension("VK_EXT_descriptor_buffer")) )
+       if ( canUseFeaturesStruct(deviceExtensions, usedApiVersion, "VK_EXT_descriptor_buffer") )
        {
                physicalDeviceDescriptorBufferFeaturesEXT.sType = getStructureType<VkPhysicalDeviceDescriptorBufferFeaturesEXT>();
                *nextPtr = &physicalDeviceDescriptorBufferFeaturesEXT;
@@ -192,7 +192,7 @@ bool checkMandatoryFeatures(const vkt::Context& context)
        vk::VkPhysicalDeviceFaultFeaturesEXT physicalDeviceFaultFeaturesEXT;
        deMemset(&physicalDeviceFaultFeaturesEXT, 0, sizeof(physicalDeviceFaultFeaturesEXT));
 
-       if ( isExtensionStructSupported(deviceExtensions, RequiredExtension("VK_EXT_device_fault")) )
+       if ( canUseFeaturesStruct(deviceExtensions, usedApiVersion, "VK_EXT_device_fault") )
        {
                physicalDeviceFaultFeaturesEXT.sType = getStructureType<VkPhysicalDeviceFaultFeaturesEXT>();
                *nextPtr = &physicalDeviceFaultFeaturesEXT;
@@ -388,7 +388,7 @@ bool checkMandatoryFeatures(const vkt::Context& context)
        vk::VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT physicalDeviceMutableDescriptorTypeFeaturesEXT;
        deMemset(&physicalDeviceMutableDescriptorTypeFeaturesEXT, 0, sizeof(physicalDeviceMutableDescriptorTypeFeaturesEXT));
 
-       if ( isExtensionStructSupported(deviceExtensions, RequiredExtension("VK_EXT_mutable_descriptor_type")) )
+       if ( canUseFeaturesStruct(deviceExtensions, usedApiVersion, "VK_VALVE_mutable_descriptor_type") || canUseFeaturesStruct(deviceExtensions, usedApiVersion, "VK_EXT_mutable_descriptor_type") )
        {
                physicalDeviceMutableDescriptorTypeFeaturesEXT.sType = getStructureType<VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT>();
                *nextPtr = &physicalDeviceMutableDescriptorTypeFeaturesEXT;
index 48a6894..e059851 100644 (file)
@@ -69,7 +69,6 @@ class DrawIndexedInstance : public vkt::TestInstance
 {
 public:
                                                                DrawIndexedInstance             (Context&                                                                               context,
-                                                                                                                std::shared_ptr<CustomInstanceWrapper>                 instanceWrapper,
                                                                                                                 Move<VkDevice>                                                                 device,
                                                                                                                 DeviceDriverPtr                                                                deviceDriver,
                                                                                                                 TestMode                                                                               mode,
@@ -81,7 +80,6 @@ public:
 
 protected:
 
-       std::shared_ptr<CustomInstanceWrapper>          m_instanceWrapper;
        Move<VkDevice>                                                          m_device;
        DeviceDriverPtr                                                         m_deviceDriver;
        TestMode                                                                        m_mode;
@@ -89,13 +87,11 @@ protected:
 };
 
 DrawIndexedInstance::DrawIndexedInstance(Context&                                                              context,
-                                                                                std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
                                                                                 Move<VkDevice>                                                 device,
                                                                                 DeviceDriverPtr                                                deviceDriver,
                                                                                 TestMode                                                               mode,
                                                                                 deUint32                                                               robustnessVersion)
        : vkt::TestInstance                     (context)
-       , m_instanceWrapper                     (instanceWrapper)
        , m_device                                      (device)
        , m_deviceDriver                        (deviceDriver)
        , m_mode                                        (mode)
@@ -107,8 +103,9 @@ tcu::TestStatus DrawIndexedInstance::iterate(void)
 {
        const DeviceInterface&  vk                                      = *m_deviceDriver;
        const deUint32                  queueFamilyIndex        = m_context.getUniversalQueueFamilyIndex();
-       const VkPhysicalDevice  physicalDevice          = chooseDevice(m_instanceWrapper->instance.getDriver(), m_instanceWrapper->instance, m_context.getTestContext().getCommandLine());
-       SimpleAllocator                 memAlloc                        (vk, *m_device, getPhysicalDeviceMemoryProperties(m_instanceWrapper->instance.getDriver(), physicalDevice));
+       const auto&                             vki                                     = m_context.getInstanceInterface();
+       const VkPhysicalDevice  physicalDevice          = chooseDevice(vki, m_context.getInstance(), m_context.getTestContext().getCommandLine());
+       SimpleAllocator                 memAlloc                        (vk, *m_device, getPhysicalDeviceMemoryProperties(vki, physicalDevice));
 
        // this is testsed - first index in index buffer is outside of bounds
        const deUint32                                  oobFirstIndex = std::numeric_limits<deUint32>::max() - 100;
@@ -400,18 +397,17 @@ TestInstance* DrawIndexedTestCase::createInstance(Context& context) const
                addToChainVulkanStructure(&nextPtr, vulkan12Features);
        }
 
-       std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
-       Move<VkDevice>  device = createRobustBufferAccessDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver(), &features2);
+       Move<VkDevice>  device = createRobustBufferAccessDevice(context, &features2);
        DeviceDriverPtr deviceDriver =
 #ifndef CTS_USES_VULKANSC
-               DeviceDriverPtr(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+               DeviceDriverPtr(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
 #else
-               DeviceDriverPtr(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(),
+               DeviceDriverPtr(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(),
                                                                                   context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()),
                                                vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
 #endif // CTS_USES_VULKANSC
 
-       return new DrawIndexedInstance(context, instanceWrapper, device, deviceDriver, m_testMode, m_robustnessVersion);
+       return new DrawIndexedInstance(context, device, deviceDriver, m_testMode, m_robustnessVersion);
 }
 
 void DrawIndexedTestCase::initPrograms(SourceCollections& sourceCollections) const