From 7d362114881ea52933ae4039a7ccaef13ebb5620 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 16 Mar 2022 17:33:17 -0500 Subject: [PATCH] Fix dEQP-VK.subgroups.size_control.compute.required_subgroup_size_*_require_full_subgroups 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 --- .../modules/vulkan/subgroups/vktSubgroupsSizeControlTests.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsSizeControlTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsSizeControlTests.cpp index 29b799d..cca789d 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsSizeControlTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsSizeControlTests.cpp @@ -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, -- 2.7.4