Do not require full subgroups when requiring a work group size
authorRicardo Garcia <rgarcia@igalia.com>
Thu, 17 Feb 2022 10:09:07 +0000 (11:09 +0100)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 3 Mar 2022 17:59:58 +0000 (17:59 +0000)
Most subgroup tests that require a particular work group size use the
VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT flag when
creating the shader stage, but that in turn forces the local size in the
X dimension to have certain values as required by the following VUID:

  VUID-VkPipelineShaderStageCreateInfo-pNext-02757

There are specific tests to check full subgroups. The flag can be safely
omitted and these other tests should still work.

Affected tests:
dEQP-VK.subgroups.*compute*

Components: Vulkan
VK-GL-CTS issue: 3520

Change-Id: Ic20d07d3a875156f817066d040ddf5813aef311f

14 files changed:
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBasicTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp

index 57fcf0d..4ff2b39 100755 (executable)
@@ -321,8 +321,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute,
-                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 2866cde..c2637dd 100755 (executable)
@@ -340,7 +340,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                };
 
                if (caseDef.subgroupSizeControl)
-                       return subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, caseDef.requiredSubgroupSize, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       return subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, caseDef.requiredSubgroupSize);
                else
                        return subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute);
        }
index 2172265..5b8177c 100755 (executable)
@@ -282,8 +282,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0u, DE_NULL, checkCompute,
-                                                                                                                               size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0u, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 6227daa..55f5c9b 100755 (executable)
@@ -355,8 +355,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0u, DE_NULL, checkCompute,
-                                                                                                                  size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0u, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 38cc0b9..4bbc661 100755 (executable)
@@ -864,8 +864,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute,
-                                                                                                                               size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 02e94e0..0e98807 100755 (executable)
@@ -1808,8 +1808,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                        // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                        for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                                {
-                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0u, DE_NULL, checkComputeSubgroupElect,
-                                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0u, DE_NULL, checkComputeSubgroupElect, size);
                                        if (result.getCode() != QP_TEST_RESULT_PASS)
                                                {
                                                        log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
@@ -1854,8 +1853,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                        // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                        for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                        {
-                               TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, inputDatas, inputDatasCount, DE_NULL, checkComputeSubgroupBarriers,
-                                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                               TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, inputDatas, inputDatasCount, DE_NULL, checkComputeSubgroupBarriers, size);
                                if (result.getCode() != QP_TEST_RESULT_PASS)
                                {
                                        log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index a86249f..e012a2b 100755 (executable)
@@ -1272,8 +1272,7 @@ TestStatus test(Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeStage,
-                                                                                                                               size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeStage, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index a53f7b6..d8b056a 100755 (executable)
@@ -1749,8 +1749,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                                {
-                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeSubgroupSize,
-                                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeSubgroupSize, size);
 
                                        if (result.getCode() != QP_TEST_RESULT_PASS)
                                        {
@@ -1774,8 +1773,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                                {
-                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeSubgroupInvocationID,
-                                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeSubgroupInvocationID, size);
 
                                        if (result.getCode() != QP_TEST_RESULT_PASS)
                                        {
@@ -1799,8 +1797,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                                {
-                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeNumSubgroups,
-                                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeNumSubgroups, size);
 
                                        if (result.getCode() != QP_TEST_RESULT_PASS)
                                        {
@@ -1824,8 +1821,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                                {
-                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeSubgroupID,
-                                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkComputeSubgroupID, size);
 
                                        if (result.getCode() != QP_TEST_RESULT_PASS)
                                        {
index cf4d499..fbdabbc 100755 (executable)
@@ -248,8 +248,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute,
-                                                                                                                               size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 1c37f14..65d9380 100755 (executable)
@@ -372,8 +372,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute,
-                                                                                                                               size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 137a333..450fd3f 100755 (executable)
@@ -277,8 +277,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus      result  = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute,
-                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus      result  = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 5a113c7..695ea9f 100755 (executable)
@@ -295,8 +295,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkCompute,
-                                                                                                                               size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, DE_NULL, 0, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index c126404..52eed35 100755 (executable)
@@ -321,8 +321,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, inputData, 2, DE_NULL, checkCompute,
-                                                                                                                       size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, inputData, 2, DE_NULL, checkCompute, size);
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {
                                log << TestLog::Message << "subgroupSize " << size << " failed" << TestLog::EndMessage;
index 54669bd..d64b496 100755 (executable)
@@ -392,7 +392,7 @@ TestStatus test (Context& context, const CaseDefinition caseDef)
                // According to the spec, requiredSubgroupSize must be a power-of-two integer.
                for (deUint32 size = subgroupSizeControlProperties.minSubgroupSize; size <= subgroupSizeControlProperties.maxSubgroupSize; size *= 2)
                {
-                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT);
+                       TestStatus result = subgroups::makeComputeTest(context, VK_FORMAT_R32_UINT, &inputData, 1, DE_NULL, checkCompute, size);
 
                        if (result.getCode() != QP_TEST_RESULT_PASS)
                        {