Extend non-const quad broadcast tests
Add two extra broadcasts to the _nonconst tests for lane indices that
are:
1. dynamically uniform in all active lanes but not all lanes are active.
2. Uniform within a quad but different in adjacent quads.
Components: Vulkan
VK-GL-CTS issue: 1978
Affects: dEQP-VK.subgroups.quad.*broadcast_nonconst_*
Change-Id: I1b4c95423de12f3750ed19789e7ca35bf718d366
diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp
index 488abe1..080a783 100755
--- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp
+++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp
@@ -153,6 +153,23 @@
<< " " << fmt << " op = " << op << "(data[gl_SubgroupInvocationID], i);\n"
<< " uint otherID = (gl_SubgroupInvocationID & ~0x3) + i;\n"
<< validate
+ << " }\n"
+ << " uint quadID = gl_SubgroupInvocationID >> 2;\n"
+ << " uint quadInvocation = gl_SubgroupInvocationID & 0x3;\n"
+ << " // Test lane ID that is only uniform in active lanes\n"
+ << " if (quadInvocation >= 2)\n"
+ << " {\n"
+ << " uint id = quadInvocation & ~1;\n"
+ << " " << fmt << " op = " << op << "(data[gl_SubgroupInvocationID], id);\n"
+ << " uint otherID = 4*quadID + id;\n"
+ << validate
+ << " }\n"
+ << " // Test lane ID that is only quad uniform, not subgroup uniform\n"
+ << " {\n"
+ << " uint id = quadID & 0x3;\n"
+ << " " << fmt << " op = " << op << "(data[gl_SubgroupInvocationID], id);\n"
+ << " uint otherID = 4*quadID + id;\n"
+ << validate
<< " }\n";
}
else