Robustness2 features are enabled by default
authorMarcin Kańtoch <marcin.kantoch@amd.com>
Wed, 17 Jun 2020 12:55:42 +0000 (14:55 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 26 Jun 2020 12:33:58 +0000 (08:33 -0400)
Robustness2 features are enabled by default for the Default Device,
but robustBufferAccess is disabled. The correct behaviour is to not
enable robustness2 features for this device and allow robustness2
tests to create a separate device with the features turned on.

Components: Framework

VK-GL-CTS issue: 2408

Change-Id: I5b5afd24d497340bd48d97c86b5cb17c509f1d72
(cherry picked from commit a20baf416c7dd115bdf3307fb9363bdabbb821ce)

external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp

index 9eed63f..cb3c08f 100644 (file)
@@ -74,9 +74,20 @@ DeviceFeatures::DeviceFeatures       (const InstanceInterface&                       vki,
                                        featuresToFillFromBlob.push_back(p);
                                else
                                {
-                                       // add to chain
-                                       *nextPtr = p->getFeatureTypeRaw();
-                                       nextPtr = p->getFeatureTypeNext();
+                                       if (p->getFeatureDesc().sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT)
+                                       {
+                                               VkPhysicalDeviceFeatures2 coreFeatures2 = initVulkanStructure();
+
+                                               coreFeatures2.pNext = p->getFeatureTypeRaw();
+
+                                               vki.getPhysicalDeviceFeatures2(physicalDevice, &coreFeatures2);
+                                       }
+                                       else
+                                       {
+                                               // add to chain
+                                               *nextPtr = p->getFeatureTypeRaw();
+                                               nextPtr = p->getFeatureTypeNext();
+                                       }
                                }
                                m_features.push_back(p);
                        }