Fix dEQP-VK.subgroups.size_control.compute.required_subgroup_size_*_require_full_subg...
authorJason Ekstrand <jason.ekstrand@collabora.com>
Wed, 16 Mar 2022 22:33:17 +0000 (17:33 -0500)
committerJason Ekstrand <jason.ekstrand@collabora.com>
Wed, 16 Mar 2022 22:49:43 +0000 (17:49 -0500)
The tests were testing full subgroups with four workgroup sizes:

 - Nx1x1
 - 1xNx1
 - 1x1xN
 - getLocalSizes() which returns a maximally large workgroup size

However, the Vulkan spec says:

    "If a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure
    is included in the pNext chain, and flags has the
    VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set,
    the local workgroup size in the X dimension of the pipeline must be
    a multiple of
    VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::requiredSubgroupSize

This means that the middle two subgroup sizes are invalid for use with
VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT.

Components: Vulkan

Affects:
 - dEQP-VK.subgroups.size_control.compute.required_subgroup_size_max_require_full_subgroups
 - dEQP-VK.subgroups.size_control.compute.required_subgroup_size_min_require_full_subgroups

Change-Id: I46f2547e1a50f78cbed6695f96448f463ca57230

external/vulkancts/modules/vulkan/subgroups/vktSubgroupsSizeControlTests.cpp

index 29b799d..cca789d 100755 (executable)
@@ -843,16 +843,19 @@ tcu::TestStatus testRequireSubgroupSize (Context& context, const CaseDefinition
                deUint32 localSizeX, localSizeY, localSizeZ;
                getLocalSizes(physicalDeviceProperties, maxTotalLocalSize, localSizeX, localSizeY, localSizeZ);
 
-               const deUint32 localSizesToTestCount = 5;
-               deUint32 localSizesToTest[localSizesToTestCount][3] =
+               deUint32 localSizesToTest[5][3] =
                {
+                       {localSizeX, localSizeY, localSizeZ},
                        {requiredSubgroupSize, 1, 1},
                        {1, requiredSubgroupSize, 1},
                        {1, 1, requiredSubgroupSize},
-                       {localSizeX, localSizeY, localSizeZ},
                        {1, 1, 1} // Isn't used, just here to make double buffering checks easier
                };
 
+               deUint32 localSizesToTestCount = 5;
+               if (caseDef.pipelineShaderStageCreateFlags & VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT)
+                       localSizesToTestCount = 3;
+
                struct internalDataStruct internalData =
                {
                        &context,