Add tests for device group creation and device group queries
authorVikram Kushwaha <vkushwaha@nvidia.com>
Fri, 9 Jun 2017 21:44:17 +0000 (14:44 -0700)
committerVikram Kushwaha <vkushwaha@nvidia.com>
Tue, 22 Aug 2017 19:34:07 +0000 (12:34 -0700)
Tests for creating device groups, object management and
querying memory features/present capabilities with device groups

New tests:
 dEQP-VK.api.info.instance.physical_device_groups
 dEQP-VK.api.object_management.single.device_group
 dEQP-VK.api.object_management.multiple_unique_resources.device_group
 dEQP-VK.api.object_management.multiple_shared_resources.device_group
 dEQP-VK.api.object_management.max_concurrent.device_group
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_group
 dEQP-VK.api.object_management.multithreaded_shared_resources.device_group
 dEQP-VK.api.object_management.single_alloc_callbacks.device_group
 dEQP-VK.api.object_management.alloc_callback_fail.device_group
 dEQP-VK.api.info.device_group.peer_memory_features
 dEQP-VK.wsi.xlib.surface.query_devgroup_present_capabilities
 dEQP-VK.wsi.xlib.surface.query_devgroup_present_modes
 dEQP-VK.wsi.xcb.surface.query_devgroup_present_capabilities
 dEQP-VK.wsi.xcb.surface.query_devgroup_present_modes
 dEQP-VK.wsi.wayland.surface.query_devgroup_present_capabilities
 dEQP-VK.wsi.wayland.surface.query_devgroup_present_modes
 dEQP-VK.wsi.mir.surface.query_devgroup_present_capabilities
 dEQP-VK.wsi.mir.surface.query_devgroup_present_modes
 dEQP-VK.wsi.android.surface.query_devgroup_present_capabilities
 dEQP-VK.wsi.android.surface.query_devgroup_present_modes
 dEQP-VK.wsi.win32.surface.query_devgroup_present_modes
 dEQP-VK.wsi.win32.surface.query_devgroup_present_capabilities

Components: Vulkan

VK-GL-CTS issue: 110

Change-Id: I829582dd294a54bbbbc021db438334c94d7712ee

android/cts/master/src/vk-excluded-tests.txt
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiSurfaceTests.cpp
external/vulkancts/mustpass/1.0.3/vk-default.txt

index 94cf783..6b98041 100644 (file)
@@ -287,3 +287,6 @@ dEQP-VK.spirv_assembly.instruction.compute.opfunord.*
 
 # New tests from AOSP
 dEQP-VK.texture.explicit_lod.*
+
+# Issue 110: Excluded wsi android tests as they require android loader support
+dEQP-VK.wsi.android.surface.query_devgroup_*
index 5dccf9b..583114e 100644 (file)
@@ -9,6 +9,7 @@ dEQP-VK.api.smoke.asm_triangle
 dEQP-VK.api.smoke.asm_triangle_no_opname
 dEQP-VK.api.smoke.unused_resolve_attachment
 dEQP-VK.api.info.instance.physical_devices
+dEQP-VK.api.info.instance.physical_device_groups
 dEQP-VK.api.info.instance.layers
 dEQP-VK.api.info.instance.extensions
 dEQP-VK.api.info.device.features
@@ -17,6 +18,7 @@ dEQP-VK.api.info.device.queue_family_properties
 dEQP-VK.api.info.device.memory_properties
 dEQP-VK.api.info.device.layers
 dEQP-VK.api.info.device.extensions
+dEQP-VK.api.info.device_group.peer_memory_features
 dEQP-VK.api.info.format_properties.r4g4_unorm_pack8
 dEQP-VK.api.info.format_properties.r4g4b4a4_unorm_pack16
 dEQP-VK.api.info.format_properties.b4g4r4a4_unorm_pack16
@@ -3535,6 +3537,7 @@ dEQP-VK.api.device_init.create_device_features2
 dEQP-VK.api.device_init.create_device_unsupported_features
 dEQP-VK.api.object_management.single.instance
 dEQP-VK.api.object_management.single.device
+dEQP-VK.api.object_management.single.device_group
 dEQP-VK.api.object_management.single.device_memory_small
 dEQP-VK.api.object_management.single.buffer_uniform_small
 dEQP-VK.api.object_management.single.buffer_uniform_large
@@ -3577,6 +3580,7 @@ dEQP-VK.api.object_management.single.command_buffer_primary
 dEQP-VK.api.object_management.single.command_buffer_secondary
 dEQP-VK.api.object_management.multiple_unique_resources.instance
 dEQP-VK.api.object_management.multiple_unique_resources.device
+dEQP-VK.api.object_management.multiple_unique_resources.device_group
 dEQP-VK.api.object_management.multiple_unique_resources.device_memory_small
 dEQP-VK.api.object_management.multiple_unique_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multiple_unique_resources.buffer_uniform_large
@@ -3618,6 +3622,7 @@ dEQP-VK.api.object_management.multiple_unique_resources.command_pool_transient
 dEQP-VK.api.object_management.multiple_unique_resources.command_buffer_primary
 dEQP-VK.api.object_management.multiple_unique_resources.command_buffer_secondary
 dEQP-VK.api.object_management.multiple_shared_resources.device
+dEQP-VK.api.object_management.multiple_shared_resources.device_group
 dEQP-VK.api.object_management.multiple_shared_resources.device_memory_small
 dEQP-VK.api.object_management.multiple_shared_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multiple_shared_resources.buffer_uniform_large
@@ -3660,6 +3665,7 @@ dEQP-VK.api.object_management.multiple_shared_resources.command_buffer_primary
 dEQP-VK.api.object_management.multiple_shared_resources.command_buffer_secondary
 dEQP-VK.api.object_management.max_concurrent.instance
 dEQP-VK.api.object_management.max_concurrent.device
+dEQP-VK.api.object_management.max_concurrent.device_group
 dEQP-VK.api.object_management.max_concurrent.device_memory_small
 dEQP-VK.api.object_management.max_concurrent.buffer_uniform_small
 dEQP-VK.api.object_management.max_concurrent.buffer_uniform_large
@@ -3742,6 +3748,7 @@ dEQP-VK.api.object_management.multithreaded_per_thread_device.command_buffer_pri
 dEQP-VK.api.object_management.multithreaded_per_thread_device.command_buffer_secondary
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.instance
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.device
+dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_group
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_memory_small
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.buffer_uniform_large
@@ -3783,6 +3790,7 @@ dEQP-VK.api.object_management.multithreaded_per_thread_resources.command_pool_tr
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.command_buffer_primary
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.command_buffer_secondary
 dEQP-VK.api.object_management.multithreaded_shared_resources.device
+dEQP-VK.api.object_management.multithreaded_shared_resources.device_group
 dEQP-VK.api.object_management.multithreaded_shared_resources.device_memory_small
 dEQP-VK.api.object_management.multithreaded_shared_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multithreaded_shared_resources.buffer_uniform_large
@@ -3822,6 +3830,7 @@ dEQP-VK.api.object_management.multithreaded_shared_resources.command_pool
 dEQP-VK.api.object_management.multithreaded_shared_resources.command_pool_transient
 dEQP-VK.api.object_management.single_alloc_callbacks.instance
 dEQP-VK.api.object_management.single_alloc_callbacks.device
+dEQP-VK.api.object_management.single_alloc_callbacks.device_group
 dEQP-VK.api.object_management.single_alloc_callbacks.device_memory_small
 dEQP-VK.api.object_management.single_alloc_callbacks.buffer_uniform_small
 dEQP-VK.api.object_management.single_alloc_callbacks.buffer_uniform_large
@@ -3864,6 +3873,7 @@ dEQP-VK.api.object_management.single_alloc_callbacks.command_buffer_primary
 dEQP-VK.api.object_management.single_alloc_callbacks.command_buffer_secondary
 dEQP-VK.api.object_management.alloc_callback_fail.instance
 dEQP-VK.api.object_management.alloc_callback_fail.device
+dEQP-VK.api.object_management.alloc_callback_fail.device_group
 dEQP-VK.api.object_management.alloc_callback_fail.device_memory_small
 dEQP-VK.api.object_management.alloc_callback_fail.buffer_uniform_small
 dEQP-VK.api.object_management.alloc_callback_fail.buffer_uniform_large
index 8c756b6..d2a7ef3 100644 (file)
@@ -1,4 +1,4 @@
-/*-------------------------------------------------------------------------
+/*-------------------------------------------------------------------------
  * Vulkan Conformance Tests
  * ------------------------
  *
@@ -29,6 +29,7 @@
 #include "vkPlatform.hpp"
 #include "vkStrUtil.hpp"
 #include "vkRef.hpp"
+#include "vkRefUtil.hpp"
 #include "vkDeviceUtil.hpp"
 #include "vkQueryUtil.hpp"
 #include "vkImageUtil.hpp"
@@ -38,6 +39,7 @@
 #include "tcuFormatUtil.hpp"
 #include "tcuTextureUtil.hpp"
 #include "tcuResultCollector.hpp"
+#include "tcuCommandLine.hpp"
 
 #include "deUniquePtr.hpp"
 #include "deString.h"
@@ -527,6 +529,14 @@ struct CheckEnumeratePhysicalDevicesIncompleteResult : public CheckIncompleteRes
        }
 };
 
+struct CheckEnumeratePhysicalDeviceGroupsIncompleteResult : public CheckIncompleteResult<VkPhysicalDeviceGroupPropertiesKHX>
+{
+       void getResult (Context& context, VkPhysicalDeviceGroupPropertiesKHX* data)
+       {
+               m_result = context.getInstanceInterface().enumeratePhysicalDeviceGroupsKHX(context.getInstance(), &m_count, data);
+       }
+};
+
 struct CheckEnumerateInstanceLayerPropertiesIncompleteResult : public CheckIncompleteResult<VkLayerProperties>
 {
        void getResult (Context& context, VkLayerProperties* data)
@@ -587,6 +597,38 @@ tcu::TestStatus enumeratePhysicalDevices (Context& context)
        return tcu::TestStatus(results.getResult(), results.getMessage());
 }
 
+Move<VkInstance> createInstanceWithExtension (const PlatformInterface& vkp, const char* extensionName)
+{
+       const vector<VkExtensionProperties>     instanceExts = enumerateInstanceExtensionProperties(vkp, DE_NULL);
+       vector<string>                                          enabledExts;
+
+       if (!isExtensionSupported(instanceExts, RequiredExtension(extensionName)))
+               TCU_THROW(NotSupportedError, (string(extensionName) + " is not supported").c_str());
+
+       enabledExts.push_back(extensionName);
+
+       return createDefaultInstance(vkp, vector<string>() /* layers */, enabledExts);
+}
+
+tcu::TestStatus enumeratePhysicalDeviceGroupsKHX (Context& context)
+{
+       TestLog&                                                                                        log                             = context.getTestContext().getLog();
+       tcu::ResultCollector                                                            results                 (log);
+       const PlatformInterface&                                                        vkp                             = context.getPlatformInterface();
+       const Unique<VkInstance>                                                        instance                (createInstanceWithExtension(vkp, "VK_KHX_device_group_creation"));
+       const InstanceDriver                                                            vki                             (vkp, *instance);
+       const vector<VkPhysicalDeviceGroupPropertiesKHX>        devicegroups    = enumeratePhysicalDeviceGroupsKHX(vki, *instance);
+
+       log << TestLog::Integer("NumDevices", "Number of device groups", "", QP_KEY_TAG_NONE, deInt64(devicegroups.size()));
+
+       for (size_t ndx = 0; ndx < devicegroups.size(); ndx++)
+               log << TestLog::Message << ndx << ": " << devicegroups[ndx] << TestLog::EndMessage;
+
+       CheckEnumeratePhysicalDeviceGroupsIncompleteResult()(context, results, devicegroups.size());
+
+       return tcu::TestStatus(results.getResult(), results.getMessage());
+}
+
 template<typename T>
 void collectDuplicates (set<T>& duplicates, const vector<T>& values)
 {
@@ -1254,6 +1296,117 @@ tcu::TestStatus deviceMemoryProperties (Context& context)
        return tcu::TestStatus::pass("Querying memory properties succeeded");
 }
 
+tcu::TestStatus deviceGroupPeerMemoryFeatures (Context& context)
+{
+       TestLog&                                                        log                                             = context.getTestContext().getLog();
+       const PlatformInterface&                        vkp                                             = context.getPlatformInterface();
+       const Unique<VkInstance>                        instance                                (createInstanceWithExtension(vkp, "VK_KHX_device_group_creation"));
+       const InstanceDriver                            vki                                             (vkp, *instance);
+       const tcu::CommandLine&                         cmdLine                                 = context.getTestContext().getCommandLine();
+       const deUint32                                          devGroupIdx                             = cmdLine.getVKDeviceGroupId() - 1;
+       const deUint32                                          deviceIdx                               = context.getTestContext().getCommandLine().getVKDeviceId() - 1u;
+       const float                                                     queuePriority                   = 1.0f;
+       VkPhysicalDeviceMemoryProperties        memProps;
+       VkPeerMemoryFeatureFlagsKHX*            peerMemFeatures;
+       deUint8                                                         buffer                                  [sizeof(VkPeerMemoryFeatureFlagsKHX) + GUARD_SIZE];
+       deUint32                                                        numPhysicalDevices              = 0;
+       deUint32                                                        queueFamilyIndex                = 0;
+
+       const vector<VkPhysicalDeviceGroupPropertiesKHX>                deviceGroupProps = enumeratePhysicalDeviceGroupsKHX(vki, *instance);
+       std::vector<const char*>                                                                deviceExtensions;
+       deviceExtensions.push_back("VK_KHX_device_group");
+       deviceExtensions.push_back("VK_KHR_swapchain");
+
+       const std::vector<VkQueueFamilyProperties>      queueProps              = getPhysicalDeviceQueueFamilyProperties(vki, deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx]);
+       for (size_t queueNdx = 0; queueNdx < queueProps.size(); queueNdx++)
+       {
+               if (queueProps[queueNdx].queueFlags & VK_QUEUE_GRAPHICS_BIT)
+                       queueFamilyIndex = (deUint32)queueNdx;
+       }
+       const VkDeviceQueueCreateInfo           deviceQueueCreateInfo   =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,                     //type
+               DE_NULL,                                                                                        //pNext
+               (VkDeviceQueueCreateFlags)0u,                                           //flags
+               queueFamilyIndex,                                                                       //queueFamilyIndex;
+               1u,                                                                                                     //queueCount;
+               &queuePriority,                                                                         //pQueuePriorities;
+       };
+
+       // Need atleast 2 devices for peer memory features
+       numPhysicalDevices = deviceGroupProps[devGroupIdx].physicalDeviceCount;
+       if (numPhysicalDevices < 2)
+               TCU_THROW(NotSupportedError, "Need a device Group with atleast 2 physical devices.");
+
+       // Create device groups
+       const VkDeviceGroupDeviceCreateInfoKHX                                  deviceGroupInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX,  //stype
+               DE_NULL,                                                                                                //pNext
+               deviceGroupProps[devGroupIdx].physicalDeviceCount,              //physicalDeviceCount
+               deviceGroupProps[devGroupIdx].physicalDevices                   //physicalDevices
+       };
+       const VkDeviceCreateInfo                                                                deviceCreateInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,                           //sType;
+               &deviceGroupInfo,                                                                       //pNext;
+               (VkDeviceCreateFlags)0u,                                                        //flags
+               1,                                                                                                      //queueRecordCount;
+               &deviceQueueCreateInfo,                                                         //pRequestedQueues;
+               0,                                                                                                      //layerCount;
+               DE_NULL,                                                                                        //ppEnabledLayerNames;
+               deUint32(deviceExtensions.size()),                                      //extensionCount;
+               &deviceExtensions[0],                                                           //ppEnabledExtensionNames;
+               DE_NULL,                                                                                        //pEnabledFeatures;
+       };
+
+       Move<VkDevice>          deviceGroup = createDevice(vki, deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx], &deviceCreateInfo);
+       const DeviceDriver      vk      (vki, *deviceGroup);
+       context.getInstanceInterface().getPhysicalDeviceMemoryProperties(deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx], &memProps);
+
+       peerMemFeatures = reinterpret_cast<VkPeerMemoryFeatureFlagsKHX*>(buffer);
+       deMemset(buffer, GUARD_VALUE, sizeof(buffer));
+
+       for (deUint32 heapIndex = 0; heapIndex < memProps.memoryHeapCount; heapIndex++)
+       {
+               for (deUint32 localDeviceIndex = 0; localDeviceIndex < numPhysicalDevices; localDeviceIndex++)
+               {
+                       for (deUint32 remoteDeviceIndex = 0; remoteDeviceIndex < numPhysicalDevices; remoteDeviceIndex++)
+                       {
+                               if (localDeviceIndex != remoteDeviceIndex)
+                               {
+                                       vk.getDeviceGroupPeerMemoryFeaturesKHX(deviceGroup.get(), heapIndex, localDeviceIndex, remoteDeviceIndex, peerMemFeatures);
+
+                                       // Check guard
+                                       for (deInt32 ndx = 0; ndx < GUARD_SIZE; ndx++)
+                                       {
+                                               if (buffer[ndx + sizeof(VkPeerMemoryFeatureFlagsKHX)] != GUARD_VALUE)
+                                               {
+                                                       log << TestLog::Message << "deviceGroupPeerMemoryFeatures - Guard offset " << ndx << " not valid" << TestLog::EndMessage;
+                                                       return tcu::TestStatus::fail("deviceGroupPeerMemoryFeatures buffer overflow");
+                                               }
+                                       }
+
+                                       VkPeerMemoryFeatureFlagsKHX requiredFlag = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX;
+                                       VkPeerMemoryFeatureFlagsKHX maxValidFlag = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX|VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX |
+                                                                                                                               VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX|VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX;
+                                       if ((!(*peerMemFeatures & requiredFlag)) ||
+                                               *peerMemFeatures > maxValidFlag)
+                                               return tcu::TestStatus::fail("deviceGroupPeerMemoryFeatures invalid flag");
+
+                                       log << TestLog::Message << "deviceGroup = " << deviceGroup.get() << TestLog::EndMessage
+                                               << TestLog::Message << "heapIndex = " << heapIndex << TestLog::EndMessage
+                                               << TestLog::Message << "localDeviceIndex = " << localDeviceIndex << TestLog::EndMessage
+                                               << TestLog::Message << "remoteDeviceIndex = " << remoteDeviceIndex << TestLog::EndMessage
+                                               << TestLog::Message << "PeerMemoryFeatureFlags = " << *peerMemFeatures << TestLog::EndMessage;
+                               }
+                       } // remote device
+               } // local device
+       } // heap Index
+
+       return tcu::TestStatus::pass("Querying deviceGroup peer memory features succeeded");
+}
+
 // \todo [2016-01-22 pyry] Optimize by doing format -> flags mapping instead
 
 VkFormatFeatureFlags getRequiredOptimalTilingFeatures (VkFormat format)
@@ -1611,7 +1764,7 @@ tcu::TestStatus formatProperties (Context& context, VkFormat format)
                if ((supported & required) != required)
                {
                        log << TestLog::Message << "ERROR in " << fieldName << ":\n"
-                                                                   << "  required: " << getFormatFeatureFlagsStr(required) << "\n  "
+                                                                       << "  required: " << getFormatFeatureFlagsStr(required) << "\n  "
                                                                        << "  missing: " << getFormatFeatureFlagsStr(~supported & required)
                                << TestLog::EndMessage;
                        allOk = false;
@@ -2079,7 +2232,7 @@ tcu::TestStatus imageFormatProperties (Context& context, const VkFormat format,
 
        if (hasKhrMaintenance1 && (supportedFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) != 0)
        {
-               results.check((supportedFeatures & (VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR)) != 0,
+               results.check((supportedFeatures & (VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR|VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR)) != 0,
                                          "A sampled image format must have VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR and VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR format feature flags set");
        }
 
@@ -2138,7 +2291,7 @@ tcu::TestStatus imageFormatProperties (Context& context, const VkFormat format,
                                results.check(imageType != VK_IMAGE_TYPE_3D || properties.maxArrayLayers == 1, "Invalid maxArrayLayers for 3D image");
 
                                if (tiling == VK_IMAGE_TILING_OPTIMAL && imageType == VK_IMAGE_TYPE_2D && !(curCreateFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
-                                        ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) ||
+                                        ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT|VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) ||
                                         ((supportedFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && deviceFeatures.shaderStorageImageMultisample)))
                                {
                                        const VkSampleCountFlags        requiredSampleCounts    = getRequiredOptimalTilingSampleCounts(deviceLimits, format, curUsageFlags);
@@ -2199,19 +2352,6 @@ tcu::TestStatus imageFormatProperties (Context& context, const VkFormat format,
 
 // VK_KHR_get_physical_device_properties2
 
-Move<VkInstance> createInstanceWithExtension (const PlatformInterface& vkp, const char* extensionName)
-{
-       const vector<VkExtensionProperties>     instanceExts    = enumerateInstanceExtensionProperties(vkp, DE_NULL);
-       vector<string>                                          enabledExts;
-
-       if (!isExtensionSupported(instanceExts, RequiredExtension(extensionName)))
-               TCU_THROW(NotSupportedError, (string(extensionName) + " is not supported").c_str());
-
-       enabledExts.push_back(extensionName);
-
-       return createDefaultInstance(vkp, vector<string>() /* layers */, enabledExts);
-}
-
 tcu::TestStatus deviceFeatures2 (Context& context)
 {
        const PlatformInterface&                vkp                     = context.getPlatformInterface();
@@ -2708,6 +2848,7 @@ tcu::TestCaseGroup* createFeatureInfoTests (tcu::TestContext& testCtx)
                de::MovePtr<tcu::TestCaseGroup> instanceInfoTests       (new tcu::TestCaseGroup(testCtx, "instance", "Instance Information Tests"));
 
                addFunctionCase(instanceInfoTests.get(), "physical_devices",            "Physical devices",                     enumeratePhysicalDevices);
+               addFunctionCase(instanceInfoTests.get(), "physical_device_groups",      "Physical devices Groups",      enumeratePhysicalDeviceGroupsKHX);
                addFunctionCase(instanceInfoTests.get(), "layers",                                      "Layers",                                       enumerateInstanceLayers);
                addFunctionCase(instanceInfoTests.get(), "extensions",                          "Extensions",                           enumerateInstanceExtensions);
 
@@ -2727,6 +2868,14 @@ tcu::TestCaseGroup* createFeatureInfoTests (tcu::TestContext& testCtx)
                infoTests->addChild(deviceInfoTests.release());
        }
 
+       {
+               de::MovePtr<tcu::TestCaseGroup> deviceGroupInfoTests (new tcu::TestCaseGroup(testCtx, "device_group", "Device Group Information Tests"));
+
+               addFunctionCase(deviceGroupInfoTests.get(), "peer_memory_features",     "Device Group peer memory features",                            deviceGroupPeerMemoryFeatures);
+
+               infoTests->addChild(deviceGroupInfoTests.release());
+       }
+
        infoTests->addChild(createTestGroup(testCtx, "format_properties",               "VkGetPhysicalDeviceFormatProperties() Tests",          createFormatTests));
        infoTests->addChild(createTestGroup(testCtx, "image_format_properties", "VkGetPhysicalDeviceImageFormatProperties() Tests",     createImageFormatTests, imageFormatProperties));
 
index 04945a7..c1b189e 100644 (file)
@@ -429,7 +429,13 @@ struct Instance
 
        struct Parameters
        {
+               const vector<string>    instanceExtensions;
+
                Parameters (void) {}
+
+               Parameters (vector<string>& extensions)
+                       : instanceExtensions    (extensions)
+               {}
        };
 
        struct Resources
@@ -442,8 +448,17 @@ struct Instance
                return getSafeObjectCount<Instance>(context, params, MAX_CONCURRENT_INSTANCES);
        }
 
-       static Move<VkInstance> create (const Environment& env, const Resources&, const Parameters&)
+       static Move<VkInstance> create (const Environment& env, const Resources&, const Parameters& params)
        {
+               vector<const char*>                                     extensionNamePtrs(params.instanceExtensions.size());
+               const vector<VkExtensionProperties>     instanceExts = enumerateInstanceExtensionProperties(env.vkp, DE_NULL);
+               for (size_t extensionID = 0; extensionID < params.instanceExtensions.size(); extensionID++)
+               {
+                       if (!isExtensionSupported(instanceExts, RequiredExtension(params.instanceExtensions[extensionID])))
+                               TCU_THROW(NotSupportedError, (params.instanceExtensions[extensionID] + " is not supported").c_str());
+                       extensionNamePtrs[extensionID] = params.instanceExtensions[extensionID].c_str();
+               }
+
                const VkApplicationInfo         appInfo                 =
                {
                        VK_STRUCTURE_TYPE_APPLICATION_INFO,
@@ -454,16 +469,17 @@ struct Instance
                        0u,                                                                     // engineVersion
                        VK_MAKE_VERSION(1,0,0)
                };
+
                const VkInstanceCreateInfo      instanceInfo    =
                {
                        VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
                        DE_NULL,
                        (VkInstanceCreateFlags)0,
                        &appInfo,
-                       0u,                                                                     // enabledLayerNameCount
-                       DE_NULL,                                                        // ppEnabledLayerNames
-                       0u,                                                                     // enabledExtensionNameCount
-                       DE_NULL,                                                        // ppEnabledExtensionNames
+                       0u,                                                                                                                             // enabledLayerNameCount
+                       DE_NULL,                                                                                                                // ppEnabledLayerNames
+                       (deUint32)extensionNamePtrs.size(),                                                             // enabledExtensionNameCount
+                       extensionNamePtrs.empty() ? DE_NULL : &extensionNamePtrs[0],    // ppEnabledExtensionNames
                };
 
                return createInstance(env.vkp, &instanceInfo, env.allocationCallbacks);
@@ -564,6 +580,119 @@ struct Device
        }
 };
 
+
+struct DeviceGroup
+{
+       typedef VkDevice Type;
+
+       struct Parameters
+       {
+               deUint32                deviceGroupIndex;
+               deUint32                deviceIndex;
+               VkQueueFlags    queueFlags;
+
+               Parameters (deUint32 deviceGroupIndex_, deUint32 deviceIndex_, VkQueueFlags queueFlags_)
+                       : deviceGroupIndex      (deviceGroupIndex_)
+                       , deviceIndex           (deviceIndex_)
+                       , queueFlags            (queueFlags_)
+               {}
+       };
+
+       struct Resources
+       {
+               vector<string>                          extensions;
+               Dependency<Instance>            instance;
+               InstanceDriver                          vki;
+               vector<VkPhysicalDevice>        physicalDevices;
+               deUint32                                        physicalDeviceCount;
+               deUint32                                        queueFamilyIndex;
+
+               Resources (const Environment& env, const Parameters& params)
+                       : extensions                    (1, "VK_KHX_device_group_creation")
+                       , instance                              (env, Instance::Parameters(extensions))
+                       , vki                                   (env.vkp, *instance.object)
+                       , physicalDeviceCount   (0)
+                       , queueFamilyIndex              (~0u)
+               {
+                       {
+                               const vector<VkPhysicalDeviceGroupPropertiesKHX> devGroupProperties = enumeratePhysicalDeviceGroupsKHX(vki, *instance.object);
+
+                               if (devGroupProperties.size() <= (size_t)params.deviceGroupIndex)
+                                       TCU_THROW(NotSupportedError, "Device Group not found");
+
+                               physicalDeviceCount     = devGroupProperties[params.deviceGroupIndex].physicalDeviceCount;
+                               physicalDevices.resize(physicalDeviceCount);
+
+                               for (deUint32 physicalDeviceIdx = 0; physicalDeviceIdx < physicalDeviceCount; physicalDeviceIdx++)
+                                       physicalDevices[physicalDeviceIdx] = devGroupProperties[params.deviceGroupIndex].physicalDevices[physicalDeviceIdx];
+                       }
+
+                       {
+                               const vector<VkQueueFamilyProperties>   queueProps = getPhysicalDeviceQueueFamilyProperties(vki, physicalDevices[params.deviceIndex]);
+                               bool                                                                    foundMatching = false;
+
+                               for (size_t curQueueNdx = 0; curQueueNdx < queueProps.size(); curQueueNdx++)
+                               {
+                                       if ((queueProps[curQueueNdx].queueFlags & params.queueFlags) == params.queueFlags)
+                                       {
+                                               queueFamilyIndex = (deUint32)curQueueNdx;
+                                               foundMatching = true;
+                                       }
+                               }
+
+                               if (!foundMatching)
+                                       TCU_THROW(NotSupportedError, "Matching queue not found");
+                       }
+               }
+       };
+
+       static deUint32 getMaxConcurrent (Context& context, const Parameters& params)
+       {
+               return getSafeObjectCount<DeviceGroup>(context, params, MAX_CONCURRENT_DEVICES);
+       }
+
+       static Move<VkDevice> create (const Environment& env, const Resources& res, const Parameters& params)
+       {
+               const float     queuePriority = 1.0;
+
+               const VkDeviceQueueCreateInfo   queues[] =
+               {
+                       {
+                               VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
+                               DE_NULL,                                                        // pNext
+                               (VkDeviceQueueCreateFlags)0,            // flags
+                               res.queueFamilyIndex,                           // queueFamilyIndex
+                               1u,                                                                     // queueCount
+                               &queuePriority,                                         // pQueuePriorities
+                       }
+               };
+
+               const VkDeviceGroupDeviceCreateInfoKHX deviceGroupInfo =
+               {
+                       VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX,  //stype
+                       DE_NULL,                                                                                                //pNext
+                       res.physicalDeviceCount,                                                                //physicalDeviceCount
+                       res.physicalDevices.data()                                                              //physicalDevices
+               };
+
+               const VkDeviceCreateInfo                deviceGroupCreateInfo =
+               {
+                       VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
+                       &deviceGroupInfo,
+                       (VkDeviceCreateFlags)0,
+                       DE_LENGTH_OF_ARRAY(queues),
+                       queues,
+                       0u,                                                                             // enabledLayerNameCount
+                       DE_NULL,                                                                // ppEnabledLayerNames
+                       0u,                                                                             // enabledExtensionNameCount
+                       DE_NULL,                                                                // ppEnabledExtensionNames
+                       DE_NULL,                                                                // pEnabledFeatures
+               };
+
+               return createDevice(res.vki, res.physicalDevices[params.deviceIndex], &deviceGroupCreateInfo, env.allocationCallbacks);
+       }
+};
+
 struct DeviceMemory
 {
        typedef VkDeviceMemory Type;
@@ -2651,6 +2780,7 @@ struct CaseDescriptions
 {
        CaseDescription<Instance>                               instance;
        CaseDescription<Device>                                 device;
+       CaseDescription<DeviceGroup>                    deviceGroup;
        CaseDescription<DeviceMemory>                   deviceMemory;
        CaseDescription<Buffer>                                 buffer;
        CaseDescription<BufferView>                             bufferView;
@@ -2695,6 +2825,7 @@ tcu::TestCaseGroup* createGroup (tcu::TestContext& testCtx, const char* name, co
 
        addCases                        (group, cases.instance);
        addCases                        (group, cases.device);
+       addCases                        (group, cases.deviceGroup);
        addCases                        (group, cases.deviceMemory);
        addCases                        (group, cases.buffer);
        addCases                        (group, cases.bufferView);
@@ -2741,15 +2872,19 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
 
        const DescriptorSetLayout::Parameters   singleUboDescLayout     = DescriptorSetLayout::Parameters::single(0u, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1u, VK_SHADER_STAGE_VERTEX_BIT);
 
-       static NamedParameters<Instance>                                s_instanceCases[]                       =
+       static NamedParameters<Instance>                                        s_instanceCases[]                               =
        {
                { "instance",                                   Instance::Parameters() },
        };
        // \note Device index may change - must not be static
-       const NamedParameters<Device>                                   s_deviceCases[]                         =
+       const NamedParameters<Device>                                           s_deviceCases[]                                 =
        {
                { "device",                                             Device::Parameters(testCtx.getCommandLine().getVKDeviceId()-1u, VK_QUEUE_GRAPHICS_BIT)  },
        };
+       const NamedParameters<DeviceGroup>                                      s_deviceGroupCases[]                    =
+       {
+               { "device_group",                               DeviceGroup::Parameters(testCtx.getCommandLine().getVKDeviceGroupId() - 1u, testCtx.getCommandLine().getVKDeviceId() - 1u, VK_QUEUE_GRAPHICS_BIT) },
+       };
        static const NamedParameters<DeviceMemory>                      s_deviceMemCases[]                              =
        {
                { "device_memory_small",                DeviceMemory::Parameters(1024, 0u)      },
@@ -2861,6 +2996,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                CASE_DESC(createSingleTest      <Instance>,                                     s_instanceCases),
                CASE_DESC(createSingleTest      <Device>,                                       s_deviceCases),
+               CASE_DESC(createSingleTest      <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(createSingleTest      <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(createSingleTest      <Buffer>,                                       s_bufferCases),
                CASE_DESC(createSingleTest      <BufferView>,                           s_bufferViewCases),
@@ -2890,6 +3026,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                CASE_DESC(createMultipleUniqueResourcesTest     <Instance>,                                     s_instanceCases),
                CASE_DESC(createMultipleUniqueResourcesTest     <Device>,                                       s_deviceCases),
+               CASE_DESC(createMultipleUniqueResourcesTest     <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(createMultipleUniqueResourcesTest     <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(createMultipleUniqueResourcesTest     <Buffer>,                                       s_bufferCases),
                CASE_DESC(createMultipleUniqueResourcesTest     <BufferView>,                           s_bufferViewCases),
@@ -2919,6 +3056,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                EMPTY_CASE_DESC(Instance), // No resources used
                CASE_DESC(createMultipleSharedResourcesTest     <Device>,                                       s_deviceCases),
+               CASE_DESC(createMultipleSharedResourcesTest     <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(createMultipleSharedResourcesTest     <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(createMultipleSharedResourcesTest     <Buffer>,                                       s_bufferCases),
                CASE_DESC(createMultipleSharedResourcesTest     <BufferView>,                           s_bufferViewCases),
@@ -2948,6 +3086,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                CASE_DESC(createMaxConcurrentTest       <Instance>,                                     s_instanceCases),
                CASE_DESC(createMaxConcurrentTest       <Device>,                                       s_deviceCases),
+               CASE_DESC(createMaxConcurrentTest       <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(createMaxConcurrentTest       <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(createMaxConcurrentTest       <Buffer>,                                       s_bufferCases),
                CASE_DESC(createMaxConcurrentTest       <BufferView>,                           s_bufferViewCases),
@@ -2975,8 +3114,9 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
 
        static const CaseDescriptions   s_multithreadedCreatePerThreadDeviceGroup       =
        {
-               EMPTY_CASE_DESC(Instance),      // Does not make sense
-               EMPTY_CASE_DESC(Device),        // Does not make sense
+               EMPTY_CASE_DESC(Instance),              // Does not make sense
+               EMPTY_CASE_DESC(Device),                // Does not make sense
+               EMPTY_CASE_DESC(DeviceGroup),   // Does not make sense
                CASE_DESC(multithreadedCreatePerThreadDeviceTest        <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(multithreadedCreatePerThreadDeviceTest        <Buffer>,                                       s_bufferCases),
                CASE_DESC(multithreadedCreatePerThreadDeviceTest        <BufferView>,                           s_bufferViewCases),
@@ -3006,6 +3146,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                CASE_DESC(multithreadedCreatePerThreadResourcesTest     <Instance>,                                     s_instanceCases),
                CASE_DESC(multithreadedCreatePerThreadResourcesTest     <Device>,                                       s_deviceCases),
+               CASE_DESC(multithreadedCreatePerThreadResourcesTest     <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(multithreadedCreatePerThreadResourcesTest     <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(multithreadedCreatePerThreadResourcesTest     <Buffer>,                                       s_bufferCases),
                CASE_DESC(multithreadedCreatePerThreadResourcesTest     <BufferView>,                           s_bufferViewCases),
@@ -3035,6 +3176,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                EMPTY_CASE_DESC(Instance),
                CASE_DESC(multithreadedCreateSharedResourcesTest        <Device>,                                       s_deviceCases),
+               CASE_DESC(multithreadedCreateSharedResourcesTest        <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(multithreadedCreateSharedResourcesTest        <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(multithreadedCreateSharedResourcesTest        <Buffer>,                                       s_bufferCases),
                CASE_DESC(multithreadedCreateSharedResourcesTest        <BufferView>,                           s_bufferViewCases),
@@ -3064,6 +3206,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                CASE_DESC(createSingleAllocCallbacksTest        <Instance>,                                     s_instanceCases),
                CASE_DESC(createSingleAllocCallbacksTest        <Device>,                                       s_deviceCases),
+               CASE_DESC(createSingleAllocCallbacksTest        <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(createSingleAllocCallbacksTest        <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(createSingleAllocCallbacksTest        <Buffer>,                                       s_bufferCases),
                CASE_DESC(createSingleAllocCallbacksTest        <BufferView>,                           s_bufferViewCases),
@@ -3094,6 +3237,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                CASE_DESC(allocCallbackFailTest <Instance>,                                     s_instanceCases),
                CASE_DESC(allocCallbackFailTest <Device>,                                       s_deviceCases),
+               CASE_DESC(allocCallbackFailTest <DeviceGroup>,                          s_deviceGroupCases),
                CASE_DESC(allocCallbackFailTest <DeviceMemory>,                         s_deviceMemCases),
                CASE_DESC(allocCallbackFailTest <Buffer>,                                       s_bufferCases),
                CASE_DESC(allocCallbackFailTest <BufferView>,                           s_bufferViewCases),
@@ -3124,6 +3268,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
        {
                EMPTY_CASE_DESC(Instance),                      // most objects can be created one at a time only
                EMPTY_CASE_DESC(Device),
+               EMPTY_CASE_DESC(DeviceGroup),
                EMPTY_CASE_DESC(DeviceMemory),
                EMPTY_CASE_DESC(Buffer),
                EMPTY_CASE_DESC(BufferView),
index 87de704..4e9787c 100644 (file)
@@ -44,6 +44,7 @@
 #include "tcuFormatUtil.hpp"
 #include "tcuPlatform.hpp"
 #include "tcuResultCollector.hpp"
+#include "tcuCommandLine.hpp"
 
 #include "deUniquePtr.hpp"
 #include "deStringUtil.hpp"
@@ -109,6 +110,12 @@ enum
        SURFACE_EXTENT_DETERMINED_BY_SWAPCHAIN_MAGIC    = 0xffffffff
 };
 
+enum
+{
+       GUARD_SIZE                                                                              = 0x20,                 //!< Number of bytes to check
+       GUARD_VALUE                                                                             = 0xcd,                 //!< Data pattern
+};
+
 template<typename T>
 class CheckIncompleteResult
 {
@@ -748,6 +755,237 @@ tcu::TestStatus querySurfacePresentModesTest (Context& context, Type wsiType)
        return tcu::TestStatus(results.getResult(), results.getMessage());
 }
 
+tcu::TestStatus queryDevGroupSurfacePresentCapabilitiesTest (Context& context, Type wsiType)
+{
+       tcu::TestLog&                                                   log                                     = context.getTestContext().getLog();
+       const InstanceHelper                                    instHelper                      (context, wsiType, vector<string>(1, string("VK_KHX_device_group_creation")));
+       const float                                                             queuePriority           = 1.0f;
+       const tcu::CommandLine&                                 cmdLine                         = context.getTestContext().getCommandLine();
+       const deUint32                                                  devGroupIdx                     = cmdLine.getVKDeviceGroupId() - 1;
+       const deUint32                                                  deviceIdx                       = context.getTestContext().getCommandLine().getVKDeviceId() - 1u;
+       const VkDeviceGroupPresentModeFlagsKHX  requiredFlag            = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX;
+       const VkDeviceGroupPresentModeFlagsKHX  maxValidFlag            = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX|VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX |
+                                                                                                                                       VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX|VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX;
+       deUint8                                                                 buffer                          [sizeof(VkDeviceGroupPresentCapabilitiesKHX) + GUARD_SIZE];
+       deUint32                                                                queueFamilyIndex        = 0;
+       VkDeviceGroupPresentCapabilitiesKHX*    presentCapabilities;
+       std::vector<const char*>                                deviceExtensions;
+       deviceExtensions.push_back("VK_KHX_device_group");
+       deviceExtensions.push_back("VK_KHR_swapchain");
+
+       const vector<VkPhysicalDeviceGroupPropertiesKHX>        deviceGroupProps = enumeratePhysicalDeviceGroupsKHX(instHelper.vki, *instHelper.instance);
+
+       const std::vector<VkQueueFamilyProperties>      queueProps              = getPhysicalDeviceQueueFamilyProperties(instHelper.vki, deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx]);
+       for (size_t queueNdx = 0; queueNdx < queueProps.size(); queueNdx++)
+       {
+               if (queueProps[queueNdx].queueFlags & VK_QUEUE_GRAPHICS_BIT)
+                       queueFamilyIndex = (deUint32)queueNdx;
+       }
+       const VkDeviceQueueCreateInfo                   deviceQueueCreateInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,                             //type
+               DE_NULL,                                                                                                //pNext
+               (VkDeviceQueueCreateFlags)0u,                                                   //flags
+               queueFamilyIndex,                                                                               //queueFamilyIndex;
+               1u,                                                                                                             //queueCount;
+               &queuePriority,                                                                                 //pQueuePriorities;
+       };
+       const VkDeviceGroupDeviceCreateInfoKHX                          deviceGroupInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX,  //stype
+               DE_NULL,                                                                                                //pNext
+               deviceGroupProps[devGroupIdx].physicalDeviceCount,              //physicalDeviceCount
+               deviceGroupProps[devGroupIdx].physicalDevices                   //physicalDevices
+       };
+       const VkDeviceCreateInfo                                                        deviceCreateInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,                                   //sType;
+               &deviceGroupInfo,                                                                               //pNext;
+               (VkDeviceCreateFlags)0u,                                                                //flags
+               1,                                                                                                              //queueRecordCount;
+               &deviceQueueCreateInfo,                                                                 //pRequestedQueues;
+               0,                                                                                                              //layerCount;
+               DE_NULL,                                                                                                //ppEnabledLayerNames;
+               deUint32(deviceExtensions.size()),                                              //enabledExtensionCount;
+               &deviceExtensions[0],                                                                   //ppEnabledExtensionNames;
+               DE_NULL,                                                                                                //pEnabledFeatures;
+       };
+       Move<VkDevice>          deviceGroup = createDevice(instHelper.vki, deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx], &deviceCreateInfo);
+       const DeviceDriver      vk      (instHelper.vki, *deviceGroup);
+
+
+       presentCapabilities = reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHX*>(buffer);
+       deMemset(buffer, GUARD_VALUE, sizeof(buffer));
+       presentCapabilities->sType = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX;
+       presentCapabilities->pNext = DE_NULL;
+       VK_CHECK(vk.getDeviceGroupPresentCapabilitiesKHX(deviceGroup.get(), presentCapabilities));
+
+       // Guard check
+       for (deInt32 ndx = 0; ndx < GUARD_SIZE; ndx++)
+       {
+               if (buffer[ndx + sizeof(VkDeviceGroupPresentCapabilitiesKHX)] != GUARD_VALUE)
+               {
+                       log << TestLog::Message << "deviceGroupPresentCapabilities - Guard offset " << ndx << " not valid" << TestLog::EndMessage;
+                       return tcu::TestStatus::fail("deviceGroupPresentCapabilities buffer overflow");
+               }
+       }
+
+       // Check each physical device can present on itself
+       for (size_t physDevIdx = 0; physDevIdx < VK_MAX_DEVICE_GROUP_SIZE_KHX; physDevIdx++)
+       {
+               if (presentCapabilities->presentMask[physDevIdx])
+                       if (!((1 << physDevIdx) & (presentCapabilities->presentMask[physDevIdx])))
+                               return tcu::TestStatus::fail("deviceGroupPresentCapabilities, device can not present on itself, invalid present mask");
+       }
+
+       // Check if flags are valid
+       if ((!(presentCapabilities->modes & requiredFlag)) ||
+               presentCapabilities->modes > maxValidFlag)
+               return tcu::TestStatus::fail("deviceGroupPresentCapabilities flag not valid");
+
+       return tcu::TestStatus::pass("Querying deviceGroup present capabilities succeeded");
+}
+
+tcu::TestStatus queryDevGroupSurfacePresentModesTest (Context& context, Type wsiType)
+{
+       tcu::TestLog&                                                   log                                     = context.getTestContext().getLog();
+       tcu::ResultCollector                                    results                         (log);
+       const InstanceHelper                                    instHelper                      (context, wsiType, vector<string>(1, string("VK_KHX_device_group_creation")));
+       const NativeObjects                                             native                          (context, instHelper.supportedExtensions, wsiType);
+       const Unique<VkSurfaceKHR>                              surface                         (createSurface(instHelper.vki, *instHelper.instance, wsiType, *native.display, *native.window));
+       const float                                                             queuePriority           = 1.0f;
+       const tcu::CommandLine&                                 cmdLine                         = context.getTestContext().getCommandLine();
+       const deUint32                                                  devGroupIdx                     = cmdLine.getVKDeviceGroupId() - 1;
+       const deUint32                                                  deviceIdx                       = context.getTestContext().getCommandLine().getVKDeviceId() - 1u;
+       const VkDeviceGroupPresentModeFlagsKHX  requiredFlag            = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX;
+       const VkDeviceGroupPresentModeFlagsKHX  maxValidFlag            = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX|VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX |
+                                                                                                                                       VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX|VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX;
+       VkResult                                                                result                          = VK_SUCCESS;
+       deUint8                                                                 buffer                          [sizeof(VkDeviceGroupPresentModeFlagsKHX) + GUARD_SIZE];
+       deUint32                                                                rectCount                       = 0;
+       deUint32                                                                incompleteRectCount     = 0;
+       deUint32                                                                queueFamilyIndex        = 0;
+       VkRect2D*                                                               presentRectangles;
+       VkDeviceGroupPresentModeFlagsKHX*               presentModeFlags;
+       vector<deUint8>                                                 rectanglesBuffer;
+       std::vector<const char*>                                deviceExtensions;
+       deviceExtensions.push_back("VK_KHX_device_group");
+       deviceExtensions.push_back("VK_KHR_swapchain");
+
+       const vector<VkPhysicalDeviceGroupPropertiesKHX>        deviceGroupProps = enumeratePhysicalDeviceGroupsKHX(instHelper.vki, *instHelper.instance);
+       const std::vector<VkQueueFamilyProperties>      queueProps              = getPhysicalDeviceQueueFamilyProperties(instHelper.vki, deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx]);
+       for (size_t queueNdx = 0; queueNdx < queueProps.size(); queueNdx++)
+       {
+               if (queueProps[queueNdx].queueFlags & VK_QUEUE_GRAPHICS_BIT)
+                       queueFamilyIndex = (deUint32)queueNdx;
+       }
+       const VkDeviceQueueCreateInfo                   deviceQueueCreateInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,                                     //type
+               DE_NULL,                                                                                                        //pNext
+               (VkDeviceQueueCreateFlags)0u,                                                           //flags
+               queueFamilyIndex,                                                                                       //queueFamilyIndex;
+               1u,                                                                                                                     //queueCount;
+               &queuePriority,                                                                                         //pQueuePriorities;
+       };
+       const VkDeviceGroupDeviceCreateInfoKHX                  deviceGroupInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX,  //stype
+               DE_NULL,                                                                                                //pNext
+               deviceGroupProps[devGroupIdx].physicalDeviceCount,              //physicalDeviceCount
+               deviceGroupProps[devGroupIdx].physicalDevices                   //physicalDevices
+       };
+       const VkDeviceCreateInfo                                                deviceCreateInfo =
+       {
+               VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,                                   //sType;
+               &deviceGroupInfo,                                                                               //pNext;
+               (VkDeviceCreateFlags)0u,                                                                //flags
+               1,                                                                                                              //queueRecordCount;
+               &deviceQueueCreateInfo,                                                                 //pRequestedQueues;
+               0,                                                                                                              //layerCount;
+               DE_NULL,                                                                                                //ppEnabledLayerNames;
+               deUint32(deviceExtensions.size()),                                              //enabledExtensionCount;
+               &deviceExtensions[0],                                                                   //ppEnabledExtensionNames;
+               DE_NULL,                                                                                                //pEnabledFeatures;
+       };
+
+       Move<VkDevice>          deviceGroup = createDevice(instHelper.vki, deviceGroupProps[devGroupIdx].physicalDevices[deviceIdx], &deviceCreateInfo);
+       const DeviceDriver      vk      (instHelper.vki, *deviceGroup);
+       presentModeFlags = reinterpret_cast<VkDeviceGroupPresentModeFlagsKHX*>(buffer);
+       deMemset(buffer, GUARD_VALUE, sizeof(buffer));
+
+       VK_CHECK(vk.getDeviceGroupSurfacePresentModesKHX(deviceGroup.get(), *surface, presentModeFlags));
+
+       // Guard check
+       for (deInt32 ndx = 0; ndx < GUARD_SIZE; ndx++)
+       {
+               if (buffer[ndx + sizeof(VkDeviceGroupPresentModeFlagsKHX)] != GUARD_VALUE)
+               {
+                       log << TestLog::Message << "queryDevGroupSurfacePresentModesTest - Guard offset " << ndx << " not valid" << TestLog::EndMessage;
+                       return tcu::TestStatus::fail("queryDevGroupSurfacePresentModesTest buffer overflow");
+               }
+       }
+
+       // Check if flags are valid
+       if ((!(*presentModeFlags & requiredFlag)) ||
+               *presentModeFlags > maxValidFlag)
+               return tcu::TestStatus::fail("queryDevGroupSurfacePresentModesTest flag not valid");
+
+       // Check presentation rectangles
+       if (*presentModeFlags == VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX)
+       {
+               for (size_t physDevIdx = 0; physDevIdx < deviceGroupProps[devGroupIdx].physicalDeviceCount; physDevIdx++)
+               {
+                       VK_CHECK(instHelper.vki.getPhysicalDevicePresentRectanglesKHX(deviceGroupProps[devGroupIdx].physicalDevices[physDevIdx], *surface, &rectCount, DE_NULL));
+                       rectanglesBuffer.resize(sizeof(VkRect2D) * rectCount + GUARD_SIZE);
+                       presentRectangles = reinterpret_cast<VkRect2D*>(rectanglesBuffer.data());
+                       deMemset(rectanglesBuffer.data(), GUARD_VALUE, rectanglesBuffer.size());
+
+                       VK_CHECK(instHelper.vki.getPhysicalDevicePresentRectanglesKHX(deviceGroupProps[devGroupIdx].physicalDevices[physDevIdx], *surface, &rectCount, presentRectangles));
+
+                       // Guard check
+                       for (deInt32 ndx = 0; ndx < GUARD_SIZE; ndx++)
+                       {
+                               if (rectanglesBuffer[ndx + sizeof(VkRect2D) * rectCount] != GUARD_VALUE)
+                               {
+                                       log << TestLog::Message << "getPhysicalDevicePresentRectanglesKHX - Guard offset " << ndx << " not valid" << TestLog::EndMessage;
+                                       return tcu::TestStatus::fail("getPhysicalDevicePresentRectanglesKHX buffer overflow");
+                               }
+                       }
+
+                       // Check rectangles do not overlap
+                       for (size_t rectIdx1 = 0; rectIdx1 < rectCount; rectIdx1++)
+                       {
+                               for (size_t rectIdx2 = 0; rectIdx2 < rectCount; rectIdx2++)
+                               {
+                                       if (rectIdx1 != rectIdx2)
+                                       {
+                                               deUint32 rectATop               = presentRectangles[rectIdx1].offset.y;
+                                               deUint32 rectALeft              = presentRectangles[rectIdx1].offset.x;
+                                               deUint32 rectABottom    = presentRectangles[rectIdx1].offset.y + presentRectangles[rectIdx1].extent.height;
+                                               deUint32 rectARight             = presentRectangles[rectIdx1].offset.x + presentRectangles[rectIdx1].extent.width;
+
+                                               deUint32 rectBTop               = presentRectangles[rectIdx2].offset.y;
+                                               deUint32 rectBLeft              = presentRectangles[rectIdx2].offset.x;
+                                               deUint32 rectBBottom    = presentRectangles[rectIdx2].offset.y + presentRectangles[rectIdx2].extent.height;
+                                               deUint32 rectBRight             = presentRectangles[rectIdx2].offset.x + presentRectangles[rectIdx2].extent.width;
+
+                                               if (rectALeft < rectBRight && rectARight > rectBLeft &&
+                                                       rectATop < rectBBottom && rectABottom > rectBTop)
+                                                       return tcu::TestStatus::fail("getPhysicalDevicePresentRectanglesKHX rectangles overlap");
+                                       }
+                               }
+                       }
+
+                       // Check incomplete
+                       incompleteRectCount = rectCount / 2;
+                       result = instHelper.vki.getPhysicalDevicePresentRectanglesKHX(deviceGroupProps[devGroupIdx].physicalDevices[physDevIdx], *surface, &incompleteRectCount, presentRectangles);
+                       results.check(result == VK_INCOMPLETE, "Expected VK_INCOMPLETE");
+               }
+       }
+       return tcu::TestStatus(results.getResult(), results.getMessage());
+}
+
 tcu::TestStatus createSurfaceInitialSizeTest (Context& context, Type wsiType)
 {
        tcu::TestLog&                                   log                             = context.getTestContext().getLog();
@@ -874,16 +1112,18 @@ void createSurfaceTests (tcu::TestCaseGroup* testGroup, vk::wsi::Type wsiType)
 {
        const PlatformProperties&       platformProperties      = getPlatformProperties(wsiType);
 
-       addFunctionCase(testGroup, "create",                                    "Create surface",                                               createSurfaceTest,                                      wsiType);
-       addFunctionCase(testGroup, "create_custom_allocator",   "Create surface with custom allocator", createSurfaceCustomAllocatorTest,       wsiType);
-       addFunctionCase(testGroup, "create_simulate_oom",               "Create surface with simulating OOM",   createSurfaceSimulateOOMTest,           wsiType);
-       addFunctionCase(testGroup, "query_support",                             "Query surface support",                                querySurfaceSupportTest,                        wsiType);
-       addFunctionCase(testGroup, "query_capabilities",                "Query surface capabilities",                   querySurfaceCapabilitiesTest,           wsiType);
-       addFunctionCase(testGroup, "query_capabilities2",               "Query extended surface capabilities",  querySurfaceCapabilities2Test,          wsiType);
-       addFunctionCase(testGroup, "query_formats",                             "Query surface formats",                                querySurfaceFormatsTest,                        wsiType);
-       addFunctionCase(testGroup, "query_formats2",                    "Query extended surface formats",               querySurfaceFormats2Test,                       wsiType);
-       addFunctionCase(testGroup, "query_present_modes",               "Query surface present modes",                  querySurfacePresentModesTest,           wsiType);
-       addFunctionCase(testGroup, "destroy_null_handle",               "Destroy VK_NULL_HANDLE surface",               destroyNullHandleSurfaceTest,           wsiType);
+       addFunctionCase(testGroup, "create",                                                            "Create surface",                                                                                       createSurfaceTest,                                                      wsiType);
+       addFunctionCase(testGroup, "create_custom_allocator",                           "Create surface with custom allocator",                                         createSurfaceCustomAllocatorTest,                       wsiType);
+       addFunctionCase(testGroup, "create_simulate_oom",                                       "Create surface with simulating OOM",                                           createSurfaceSimulateOOMTest,                           wsiType);
+       addFunctionCase(testGroup, "query_support",                                                     "Query surface support",                                                                        querySurfaceSupportTest,                                        wsiType);
+       addFunctionCase(testGroup, "query_capabilities",                                        "Query surface capabilities",                                                           querySurfaceCapabilitiesTest,                           wsiType);
+       addFunctionCase(testGroup, "query_capabilities2",                                       "Query extended surface capabilities",                                          querySurfaceCapabilities2Test,                          wsiType);
+       addFunctionCase(testGroup, "query_formats",                                                     "Query surface formats",                                                                        querySurfaceFormatsTest,                                        wsiType);
+       addFunctionCase(testGroup, "query_formats2",                                            "Query extended surface formats",                                                       querySurfaceFormats2Test,                                       wsiType);
+       addFunctionCase(testGroup, "query_present_modes",                                       "Query surface present modes",                                                          querySurfacePresentModesTest,                           wsiType);
+       addFunctionCase(testGroup, "query_devgroup_present_capabilities",       "Query surface present modes capabilities in device groups",queryDevGroupSurfacePresentCapabilitiesTest,wsiType);
+       addFunctionCase(testGroup, "query_devgroup_present_modes",                      "Query surface present modes for device groups",                        queryDevGroupSurfacePresentModesTest,           wsiType);
+       addFunctionCase(testGroup, "destroy_null_handle",                                       "Destroy VK_NULL_HANDLE surface",                                                       destroyNullHandleSurfaceTest,                           wsiType);
 
        if ((platformProperties.features & PlatformProperties::FEATURE_INITIAL_WINDOW_SIZE) != 0)
                addFunctionCase(testGroup, "initial_size",      "Create surface with initial window size set",  createSurfaceInitialSizeTest,   wsiType);
index 05d1595..d17161a 100644 (file)
@@ -9,6 +9,7 @@ dEQP-VK.api.smoke.asm_triangle
 dEQP-VK.api.smoke.asm_triangle_no_opname
 dEQP-VK.api.smoke.unused_resolve_attachment
 dEQP-VK.api.info.instance.physical_devices
+dEQP-VK.api.info.instance.physical_device_groups
 dEQP-VK.api.info.instance.layers
 dEQP-VK.api.info.instance.extensions
 dEQP-VK.api.info.device.features
@@ -17,6 +18,7 @@ dEQP-VK.api.info.device.queue_family_properties
 dEQP-VK.api.info.device.memory_properties
 dEQP-VK.api.info.device.layers
 dEQP-VK.api.info.device.extensions
+dEQP-VK.api.info.device_group.peer_memory_features
 dEQP-VK.api.info.format_properties.r4g4_unorm_pack8
 dEQP-VK.api.info.format_properties.r4g4b4a4_unorm_pack16
 dEQP-VK.api.info.format_properties.b4g4r4a4_unorm_pack16
@@ -3532,6 +3534,7 @@ dEQP-VK.api.device_init.create_device_features2
 dEQP-VK.api.device_init.create_device_unsupported_features
 dEQP-VK.api.object_management.single.instance
 dEQP-VK.api.object_management.single.device
+dEQP-VK.api.object_management.single.device_group
 dEQP-VK.api.object_management.single.device_memory_small
 dEQP-VK.api.object_management.single.buffer_uniform_small
 dEQP-VK.api.object_management.single.buffer_uniform_large
@@ -3574,6 +3577,7 @@ dEQP-VK.api.object_management.single.command_buffer_primary
 dEQP-VK.api.object_management.single.command_buffer_secondary
 dEQP-VK.api.object_management.multiple_unique_resources.instance
 dEQP-VK.api.object_management.multiple_unique_resources.device
+dEQP-VK.api.object_management.multiple_unique_resources.device_group
 dEQP-VK.api.object_management.multiple_unique_resources.device_memory_small
 dEQP-VK.api.object_management.multiple_unique_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multiple_unique_resources.buffer_uniform_large
@@ -3615,6 +3619,7 @@ dEQP-VK.api.object_management.multiple_unique_resources.command_pool_transient
 dEQP-VK.api.object_management.multiple_unique_resources.command_buffer_primary
 dEQP-VK.api.object_management.multiple_unique_resources.command_buffer_secondary
 dEQP-VK.api.object_management.multiple_shared_resources.device
+dEQP-VK.api.object_management.multiple_shared_resources.device_group
 dEQP-VK.api.object_management.multiple_shared_resources.device_memory_small
 dEQP-VK.api.object_management.multiple_shared_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multiple_shared_resources.buffer_uniform_large
@@ -3657,6 +3662,7 @@ dEQP-VK.api.object_management.multiple_shared_resources.command_buffer_primary
 dEQP-VK.api.object_management.multiple_shared_resources.command_buffer_secondary
 dEQP-VK.api.object_management.max_concurrent.instance
 dEQP-VK.api.object_management.max_concurrent.device
+dEQP-VK.api.object_management.max_concurrent.device_group
 dEQP-VK.api.object_management.max_concurrent.device_memory_small
 dEQP-VK.api.object_management.max_concurrent.buffer_uniform_small
 dEQP-VK.api.object_management.max_concurrent.buffer_uniform_large
@@ -3739,6 +3745,7 @@ dEQP-VK.api.object_management.multithreaded_per_thread_device.command_buffer_pri
 dEQP-VK.api.object_management.multithreaded_per_thread_device.command_buffer_secondary
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.instance
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.device
+dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_group
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_memory_small
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.buffer_uniform_large
@@ -3780,6 +3787,7 @@ dEQP-VK.api.object_management.multithreaded_per_thread_resources.command_pool_tr
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.command_buffer_primary
 dEQP-VK.api.object_management.multithreaded_per_thread_resources.command_buffer_secondary
 dEQP-VK.api.object_management.multithreaded_shared_resources.device
+dEQP-VK.api.object_management.multithreaded_shared_resources.device_group
 dEQP-VK.api.object_management.multithreaded_shared_resources.device_memory_small
 dEQP-VK.api.object_management.multithreaded_shared_resources.buffer_uniform_small
 dEQP-VK.api.object_management.multithreaded_shared_resources.buffer_uniform_large
@@ -3819,6 +3827,7 @@ dEQP-VK.api.object_management.multithreaded_shared_resources.command_pool
 dEQP-VK.api.object_management.multithreaded_shared_resources.command_pool_transient
 dEQP-VK.api.object_management.single_alloc_callbacks.instance
 dEQP-VK.api.object_management.single_alloc_callbacks.device
+dEQP-VK.api.object_management.single_alloc_callbacks.device_group
 dEQP-VK.api.object_management.single_alloc_callbacks.device_memory_small
 dEQP-VK.api.object_management.single_alloc_callbacks.buffer_uniform_small
 dEQP-VK.api.object_management.single_alloc_callbacks.buffer_uniform_large
@@ -3861,6 +3870,7 @@ dEQP-VK.api.object_management.single_alloc_callbacks.command_buffer_primary
 dEQP-VK.api.object_management.single_alloc_callbacks.command_buffer_secondary
 dEQP-VK.api.object_management.alloc_callback_fail.instance
 dEQP-VK.api.object_management.alloc_callback_fail.device
+dEQP-VK.api.object_management.alloc_callback_fail.device_group
 dEQP-VK.api.object_management.alloc_callback_fail.device_memory_small
 dEQP-VK.api.object_management.alloc_callback_fail.buffer_uniform_small
 dEQP-VK.api.object_management.alloc_callback_fail.buffer_uniform_large
@@ -201459,6 +201469,8 @@ dEQP-VK.wsi.xlib.surface.query_capabilities2
 dEQP-VK.wsi.xlib.surface.query_formats
 dEQP-VK.wsi.xlib.surface.query_formats2
 dEQP-VK.wsi.xlib.surface.query_present_modes
+dEQP-VK.wsi.xlib.surface.query_devgroup_present_capabilities
+dEQP-VK.wsi.xlib.surface.query_devgroup_present_modes
 dEQP-VK.wsi.xlib.surface.destroy_null_handle
 dEQP-VK.wsi.xlib.surface.initial_size
 dEQP-VK.wsi.xlib.surface.resize
@@ -201512,6 +201524,8 @@ dEQP-VK.wsi.xcb.surface.query_capabilities2
 dEQP-VK.wsi.xcb.surface.query_formats
 dEQP-VK.wsi.xcb.surface.query_formats2
 dEQP-VK.wsi.xcb.surface.query_present_modes
+dEQP-VK.wsi.xcb.surface.query_devgroup_present_capabilities
+dEQP-VK.wsi.xcb.surface.query_devgroup_present_modes
 dEQP-VK.wsi.xcb.surface.destroy_null_handle
 dEQP-VK.wsi.xcb.surface.initial_size
 dEQP-VK.wsi.xcb.surface.resize
@@ -201565,6 +201579,8 @@ dEQP-VK.wsi.wayland.surface.query_capabilities2
 dEQP-VK.wsi.wayland.surface.query_formats
 dEQP-VK.wsi.wayland.surface.query_formats2
 dEQP-VK.wsi.wayland.surface.query_present_modes
+dEQP-VK.wsi.wayland.surface.query_devgroup_present_capabilities
+dEQP-VK.wsi.wayland.surface.query_devgroup_present_modes
 dEQP-VK.wsi.wayland.surface.destroy_null_handle
 dEQP-VK.wsi.wayland.swapchain.create.min_image_count
 dEQP-VK.wsi.wayland.swapchain.create.image_format
@@ -201617,6 +201633,8 @@ dEQP-VK.wsi.mir.surface.query_capabilities2
 dEQP-VK.wsi.mir.surface.query_formats
 dEQP-VK.wsi.mir.surface.query_formats2
 dEQP-VK.wsi.mir.surface.query_present_modes
+dEQP-VK.wsi.mir.surface.query_devgroup_present_capabilities
+dEQP-VK.wsi.mir.surface.query_devgroup_present_modes
 dEQP-VK.wsi.mir.surface.destroy_null_handle
 dEQP-VK.wsi.mir.surface.initial_size
 dEQP-VK.wsi.mir.surface.resize
@@ -201691,6 +201709,8 @@ dEQP-VK.wsi.android.surface.query_capabilities2
 dEQP-VK.wsi.android.surface.query_formats
 dEQP-VK.wsi.android.surface.query_formats2
 dEQP-VK.wsi.android.surface.query_present_modes
+dEQP-VK.wsi.android.surface.query_devgroup_present_capabilities
+dEQP-VK.wsi.android.surface.query_devgroup_present_modes
 dEQP-VK.wsi.android.surface.destroy_null_handle
 dEQP-VK.wsi.android.surface.initial_size
 dEQP-VK.wsi.android.swapchain.create.min_image_count
@@ -201764,6 +201784,8 @@ dEQP-VK.wsi.win32.surface.query_capabilities2
 dEQP-VK.wsi.win32.surface.query_formats
 dEQP-VK.wsi.win32.surface.query_formats2
 dEQP-VK.wsi.win32.surface.query_present_modes
+dEQP-VK.wsi.win32.surface.query_devgroup_present_capabilities
+dEQP-VK.wsi.win32.surface.query_devgroup_present_modes
 dEQP-VK.wsi.win32.surface.destroy_null_handle
 dEQP-VK.wsi.win32.surface.initial_size
 dEQP-VK.wsi.win32.surface.resize