Check ballot requirement in subgroup basic tests
authorGraeme Leese <gleese@broadcom.com>
Thu, 8 Mar 2018 15:54:13 +0000 (15:54 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 11 May 2018 10:13:13 +0000 (06:13 -0400)
If ballot operations are not supported then the tests should return
NotSupported.

Components: Vulkan
Affects: dEQP-VK.subgroups.basic.*_framebuffer
VK-GL-CTS issue: 1127

Change-Id: I2c72a0821799ec2b94c08d2791f9d013ef7d122c

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

index 4a69d33..c157e04 100644 (file)
@@ -1910,6 +1910,14 @@ tcu::TestStatus noSSBOtest (Context& context, const CaseDefinition caseDef)
                                   " is a required capability!");
        }
 
+       if (OPTYPE_ELECT != caseDef.opType && VK_SHADER_STAGE_COMPUTE_BIT != caseDef.shaderStage)
+       {
+               if (!subgroups::isSubgroupFeatureSupportedForDevice(context, VK_SUBGROUP_FEATURE_BALLOT_BIT))
+               {
+                       TCU_THROW(NotSupportedError, "Subgroup basic operation non-compute stage test required that ballot operations are supported!");
+               }
+       }
+
        const deUint32                                          inputDatasCount = OPTYPE_SUBGROUP_MEMORY_BARRIER_IMAGE == caseDef.opType ? 3u : 2u;
        std::vector<subgroups::SSBOData>        inputDatas              (inputDatasCount);